bump: svelte -> 5.34.8 (#600)
* bump: svelte -> 5.34.8 * fix: unfreeze lockfile * fix: add svelte override
This commit is contained in:
1 parent
de3ca92544
commit
b98b902c7a
11 files changed
+18
-27
No files matched your search
@@ -34,13 +34,6 @@
|
||||
|
||||
let { data } = $props()
|
||||
|
||||
// hack to fix effect bug
|
||||
// TODO find cause
|
||||
let comments = $state(data.comments)
|
||||
$effect(() => {
|
||||
comments = data.comments
|
||||
})
|
||||
|
||||
onMount(async () => {
|
||||
if (
|
||||
!(data.post.value.post_view.read && settings.markPostsAsRead) &&
|
||||
@@ -64,7 +57,7 @@
|
||||
|
||||
async function reloadComments() {
|
||||
loading = true
|
||||
comments = getClient().getComments({
|
||||
data.comments.value = getClient().getComments({
|
||||
page: 1,
|
||||
limit: 25,
|
||||
type_: 'All',
|
||||
@@ -248,7 +241,7 @@
|
||||
</Button>
|
||||
</noscript>
|
||||
{/if}
|
||||
{#await comments}
|
||||
{#await data.comments.value}
|
||||
<div class="flex flex-col gap-4">
|
||||
{#each new Array(10) as _, index}
|
||||
{_}
|
||||
|
||||
@@ -62,7 +62,7 @@ export async function load({ params, url, fetch }) {
|
||||
}),
|
||||
post: new ReactiveState(post),
|
||||
commentSort: new ReactiveState(sort),
|
||||
comments: (await awaitIfServer(comments)).data,
|
||||
comments: new ReactiveState((await awaitIfServer(comments)).data),
|
||||
slots: {
|
||||
sidebar: {
|
||||
component: CommunityCard,
|
||||
|
||||
@@ -40,9 +40,10 @@
|
||||
focus,
|
||||
virtualize = true,
|
||||
}: Props = $props()
|
||||
let comments = $state(passedComments)
|
||||
|
||||
let commenting = $state(false)
|
||||
|
||||
let comments = $derived(passedComments)
|
||||
|
||||
let tree = $state(buildCommentsTree(comments.comments))
|
||||
$effect(() => {
|
||||
tree = buildCommentsTree(comments.comments)
|
||||
@@ -144,7 +145,7 @@
|
||||
{:else}
|
||||
<div class="divide-y divide-slate-200 dark:divide-zinc-800">
|
||||
<div class="-mx-4 sm:-mx-6 px-4 sm:px-6">
|
||||
<Comments isParent={true} bind:nodes={tree} post={post.post_view.post} />
|
||||
<Comments isParent={true} nodes={tree} post={post.post_view.post} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
Reference in new issue
Block a user