Skip to content

Commit

Permalink
[example/until] replace call to jsonplaceholder with a static text (#…
Browse files Browse the repository at this point in the history
…1337)

Co-authored-by: Mor Kadosh <[email protected]>
  • Loading branch information
kadoshms and Mor Kadosh authored May 30, 2024
1 parent 18419ed commit fb937bb
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ import {customElement, state} from 'lit/decorators.js';
import {until} from 'lit/directives/until.js';

const fetchData = async () => {
const response = await fetch('https://jsonplaceholder.typicode.com/todos/2');
const json = await response.json();
// Add some delay for demo purposes
await new Promise<void>((r) => setTimeout(() => r(), 1000));
return json.title;
await new Promise<void>((r) => setTimeout(() => r(), 2000));
return 'Lorem Ipsum';
}

@customElement('my-element')
Expand Down

0 comments on commit fb937bb

Please sign in to comment.