diff --git a/src/features/Posts/pages/CreatePostPage/CreatePostPage.tsx b/src/features/Posts/pages/CreatePostPage/CreatePostPage.tsx
index bd898ed..64eb671 100644
--- a/src/features/Posts/pages/CreatePostPage/CreatePostPage.tsx
+++ b/src/features/Posts/pages/CreatePostPage/CreatePostPage.tsx
@@ -22,39 +22,41 @@ export default function CreatePostPage() {
{postType === 'bounty' &&
-
- {/*
*/}
-
>
diff --git a/src/features/Posts/pages/CreatePostPage/CreateStoryPage/CreateStoryPage.tsx b/src/features/Posts/pages/CreatePostPage/CreateStoryPage/CreateStoryPage.tsx
index 9551388..1db1541 100644
--- a/src/features/Posts/pages/CreatePostPage/CreateStoryPage/CreateStoryPage.tsx
+++ b/src/features/Posts/pages/CreatePostPage/CreateStoryPage/CreateStoryPage.tsx
@@ -1,7 +1,9 @@
import { yupResolver } from "@hookform/resolvers/yup";
import { useRef, useState } from "react";
+import { ErrorBoundary, withErrorBoundary } from "react-error-boundary";
import { FormProvider, NestedValue, Resolver, useForm } from "react-hook-form";
+import ErrorPage from "src/Components/Errors/ErrorPage/ErrorPage";
import { CreateStoryMutationVariables, Post_Type } from "src/graphql";
import { StorageService } from "src/services";
import { useAppSelector } from "src/utils/hooks";
@@ -43,7 +45,7 @@ export type CreateStoryType = Override
('story-edit');
-export default function CreateStoryPage() {
+function CreateStoryPage() {
const { story } = useAppSelector(state => ({
@@ -91,3 +93,6 @@ export default function CreateStoryPage() {
)
}
+
+// TODO: change the default cover_image on error
+export default withErrorBoundary(CreateStoryPage, { FallbackComponent: ErrorPage, onError: () => { storageService.set({ ...storageService.get()!, cover_image: null as any }) } })
\ No newline at end of file