We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44bddbb commit 7607ae0Copy full SHA for 7607ae0
src/lib/Tweet/Tweet.svelte
@@ -5,10 +5,9 @@
5
type Props = Parameters<typeof getTweet>[0];
6
7
const { id }: Props = $props();
8
+ const tweet = getTweet({ id });
9
</script>
10
-<svelte:boundary>
11
- {#snippet pending()} loading{/snippet}
12
- <!-- eslint-disable-next-line antfu/no-top-level-await -->
13
- <Sveltweet tweet={await getTweet({ id })} />
14
-</svelte:boundary>
+{#if tweet.current != null}
+ <Sveltweet tweet={tweet.current} />
+{/if}
0 commit comments