Skip to content

Commit 7607ae0

Browse files
committed
fix: stop using boundary because current svelte doesn't support asynchronous server-side rendering
1 parent 44bddbb commit 7607ae0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib/Tweet/Tweet.svelte

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
type Props = Parameters<typeof getTweet>[0];
66
77
const { id }: Props = $props();
8+
const tweet = getTweet({ id });
89
</script>
910

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>
11+
{#if tweet.current != null}
12+
<Sveltweet tweet={tweet.current} />
13+
{/if}

0 commit comments

Comments
 (0)