fix: extract type selection to PostFormState class for consistency
This commit is contained in:
4 files changed
+30
-22
No files matched your search
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user