mirror of
https://github.com/WDI-Ideas/rubix-admin-panel.git
synced 2026-04-28 04:05:51 +00:00
BLOG BUG FIX
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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"),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user