fix: comments not updating

This commit is contained in:
James Xylight committed 2025-02-05 21:24:55 -08:00
1 parent 714cb37a6e
commit 9970c8af6b
3 files changed
+141 -103

No files matched your search

@@ -16,13 +16,11 @@
let { nodes, post, scrollTo }: Props = $props()
let nodesState = $state(nodes)
let virtualListEl = $state<HTMLElement>()
let virtualizer = $derived(
createWindowVirtualizer({
count: nodesState.length,
count: nodes.length,
estimateSize: () => 30,
scrollMargin: virtualListEl?.offsetTop,
initialRect: {
@@ -73,7 +71,7 @@
data-index={row.index}
class="-mx-4 sm:-mx-6 px-4 sm:px-6"
>
<Comments isParent={true} nodes={[nodesState[row.index]]} {post} />
<Comments isParent={true} nodes={[nodes[row.index]]} {post} />
</div>
{/each}
</div>