BLOG BUG FIX

This commit is contained in:
2024-05-21 15:45:22 +05:30
parent 87a1a1a54c
commit 29d9098009
4 changed files with 21 additions and 8 deletions

View File

@@ -21,6 +21,17 @@ const Banner = () => {
return (
<Box {...OPACITY_ON_LOAD} overflowY={"scroll"} height={"100vh"}>
<Header title={"👋🏻 Hi, Admin"} />
<BannerStack
stackTitle={"Home banner"}
viewAllLink={"/banner/home"}
bannerIsLoading={homeBanner?.isLoading}
bannerArray={homeBanner?.data?.data?.rows?.slice(0, 3)}
viewBannerLink={"/banner/home/view"}
/>
<Divider/>
<BannerStack
stackTitle={"Community banner"}
viewAllLink={"/banner/banner-community"}
@@ -53,13 +64,6 @@ const Banner = () => {
bannerArray={newsBanner?.data?.data?.rows?.slice(0, 3)}
viewBannerLink={"/banner/news/view"}
/>
<BannerStack
stackTitle={"Home banner"}
viewAllLink={"/banner/home"}
bannerIsLoading={homeBanner?.isLoading}
bannerArray={homeBanner?.data?.data?.rows?.slice(0, 3)}
viewBannerLink={"/banner/home/view"}
/>
</Box>
);
};

View File

@@ -50,6 +50,7 @@ const AddBlogsAndArticles = () => {
register,
handleSubmit,
reset,
setValue: setYupFormValue,
formState: { errors },
} = useForm({
resolver: yupResolver(addBlogSchema),
@@ -59,6 +60,7 @@ const AddBlogsAndArticles = () => {
const onSubmit = async (data) => {
console.log(data);
setYupFormValue('content', value)
const formData = new FormData();
formData.append("author_name", data.author_name);
formData.append("author_designation", data.author_designation);

View File

@@ -93,6 +93,13 @@ export const RouteLink = [
{ path: "banner/news/view/:id", Component: BannerNewsView },
{ path: "banner/news/edit/:id", Component: BannerNewsEdit },
// =============[ ecosystem banner ]================
{ path: "banner/ecosystem", Component: UnderConstruction },
{ path: "banner/ecosystem/add-banner", Component: UnderConstruction },
{ path: "banner/ecosystem/view/:id", Component: UnderConstruction },
{ path: "banner/ecosystem/edit/:id", Component: UnderConstruction },
// =============[ home banner ]================
{ path: "banner/home", Component: HomeBanner },
{ path: "banner/home/add-banner", Component: HomeBannerAdd },

View File

@@ -86,7 +86,7 @@ export const addBlogSchema = Yup.object().shape({
author_designation: Yup.string().required("Author designation is required"),
title: Yup.string().required("Title is required"),
meta_description: Yup.string().required("Description is required"),
content: Yup.string().required("Content is required"),
content: Yup.string(),
summary: Yup.string().required("Summary is required"),
});