fix: fix posts not working

This commit is contained in:
Xyphyn committed 2023-07-26 15:51:47 -07:00
1 parent e54031faae
commit 013d2341f9
4 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@
{maxlength} {maxlength}
{rows} {rows}
class="w-full px-3 text-sm py-2.5 bg-white dark:bg-black class="w-full px-3 text-sm py-2.5 bg-white dark:bg-black
border border-slate-300 dark:border-zinc-800 dark:focus:border-white border border-slate-300 dark:border-zinc-700 dark:focus:border-white
focus:outline-none focus:border-black transition-colors rounded-md {clazz}" focus:outline-none focus:border-black transition-colors rounded-md {clazz}"
/> />
</label> </label>
@@ -69,7 +69,7 @@
</script> </script>
{#if editing} {#if editing}
<Modal bind:open={editing}> <Modal bind:open={editing} class="max-w-[90vw] w-[34rem]">
<PostForm <PostForm
edit edit
editingPost={post.post} editingPost={post.post}
@@ -109,7 +109,7 @@
dispatcher('submit', post.post_view) dispatcher('submit', post.post_view)
} else { } else {
let image = data.image ? await uploadImage(data.image[0]) : undefined let image = data.image ? await uploadImage(data.image[0]) : undefined
data.url = image || data.url data.url = image || data.url || undefined
const post = await getClient().createPost({ const post = await getClient().createPost({
auth: $authData.token, auth: $authData.token,
community_id: data.community!, community_id: data.community!,
+2 -1
View File
@@ -23,8 +23,9 @@ flex flex-col items-center justify-center bg-black/50 backdrop-blur-sm"
<div <div
on:click|stopPropagation={() => {}} on:click|stopPropagation={() => {}}
transition:scale={{ start: 0.9, easing: expoOut }} transition:scale={{ start: 0.9, easing: expoOut }}
class={$$props.class}
> >
<Card class="min-w-[24rem] dark:!bg-zinc-950 rounded-xl max-w-xl"> <Card class="w-full dark:!bg-zinc-950 rounded-xl max-w-xl">
<div class="p-6 flex flex-col gap-4"> <div class="p-6 flex flex-col gap-4">
{#if $$slots.title} {#if $$slots.title}
<h1 class="font-bold text-2xl"> <h1 class="font-bold text-2xl">