From 6ade60c5a8d8fadcfc3273d86200757d154f56e9 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 27 Sep 2022 18:29:46 -0400 Subject: [PATCH] Lint --- web/pages/date-docs/create.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/web/pages/date-docs/create.tsx b/web/pages/date-docs/create.tsx index a24905d9..5d72da42 100644 --- a/web/pages/date-docs/create.tsx +++ b/web/pages/date-docs/create.tsx @@ -32,7 +32,6 @@ export default function CreateDateDocPage() { 'Will I find a partner in the next 3 months?' ) - const [error, setError] = useState('') const [isSubmitting, setIsSubmitting] = useState(false) const { editor, upload } = useTextEditor({ @@ -82,11 +81,8 @@ export default function CreateDateDocPage() { question, } - const result = await createPost(newPost).catch((e) => { - console.log(e) - setError('There was an error creating the post, please try again') - return e - }) + const result = await createPost(newPost) + if (result.post) { await Router.push(`/date-docs/${user.username}`) }