+
+
+
+ {(!isValid && isSubmitted) &&
+ {errors.title && -
+ {errors.title.message}
+
}
+ {errors.cover_image && -
+ {errors.cover_image.message}
+
}
+ {errors.tags && -
+ {errors.tags.message}
+
}
+ {errors.body && -
+ {errors.body.message}
+
}
+
}
+
-
-
-
-
-
+
)
}
diff --git a/src/features/Posts/pages/CreatePostPage/CreatePostPage.tsx b/src/features/Posts/pages/CreatePostPage/CreatePostPage.tsx
index bbe3c90..48c7e65 100644
--- a/src/features/Posts/pages/CreatePostPage/CreatePostPage.tsx
+++ b/src/features/Posts/pages/CreatePostPage/CreatePostPage.tsx
@@ -2,11 +2,9 @@ import { useState } from "react";
import { Helmet } from "react-helmet";
import { FiArrowLeft } from "react-icons/fi";
import { useNavigate, useParams } from "react-router-dom";
-import { usePreload } from "src/utils/hooks";
import BountyForm from "./Components/BountyForm/BountyForm";
import QuestionForm from "./Components/QuestionForm/QuestionForm";
import StoryForm from "./Components/StoryForm/StoryForm";
-import PostTypeList from "./PostTypeList";
interface Props {
@@ -18,7 +16,6 @@ export default function CreatePostPage() {
const [postType, setPostType] = useState<'story' | 'bounty' | 'question'>((type as any) ?? 'story');
- usePreload('PreviewPostPage');
const navigate = useNavigate();
@@ -29,7 +26,7 @@ export default function CreatePostPage() {
{postType === 'question' &&