fix: extract type selection to PostFormState class for consistency

This commit is contained in:
Xylight committed 2025-11-15 16:27:01 -08:00
1 parent 939c36158f
commit 1e09647e5d
4 files changed
+30 -22

No files matched your search

+5 -1
View File
@@ -37,7 +37,11 @@
</svelte:head>
<PostForm
init={new PostFormState(crosspost ?? { community: community?.community })}
init={crosspost
? new PostFormState(crosspost)
: community
? new PostFormState({ community: community?.community })
: undefined}
onsubmit={(post) => goto(postLink(post.post))}
>
{#snippet title()}{/snippet}