fix: crossposts aren't working
This commit is contained in:
1 file changed
+4
-8
@@ -7,11 +7,7 @@
|
|||||||
import { t } from '$lib/translations.js'
|
import { t } from '$lib/translations.js'
|
||||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||||
|
|
||||||
let {
|
let { data } = $props()
|
||||||
data = {
|
|
||||||
crosspost: false,
|
|
||||||
},
|
|
||||||
} = $props()
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (!profile.data?.jwt) {
|
if (!profile.data?.jwt) {
|
||||||
@@ -27,7 +23,7 @@
|
|||||||
setSessionStorage('lastSeenCommunity', undefined)
|
setSessionStorage('lastSeenCommunity', undefined)
|
||||||
})
|
})
|
||||||
|
|
||||||
let draft = getSessionStorage('postDraft') as any
|
let post = getSessionStorage('postDraft') as any
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
@@ -36,8 +32,8 @@
|
|||||||
|
|
||||||
<div class="w-full max-w-5xl mx-auto h-full">
|
<div class="w-full max-w-5xl mx-auto h-full">
|
||||||
<PostForm
|
<PostForm
|
||||||
data={data.crosspost == true
|
passedData={data.crosspost == true
|
||||||
? draft
|
? post
|
||||||
: {
|
: {
|
||||||
body: '',
|
body: '',
|
||||||
community: null,
|
community: null,
|
||||||
|
|||||||
Reference in new issue
Block a user