mirror of
https://github.com/WDI-Ideas/rubix-admin-panel.git
synced 2026-04-27 19:15:51 +00:00
updated
This commit is contained in:
@@ -198,7 +198,16 @@ const BannerCommunity = ({
|
||||
</Box>
|
||||
</Tooltip>
|
||||
),
|
||||
"Button title": item?.CTO_button_title,
|
||||
"Button title":
|
||||
<Tooltip
|
||||
className="rounded-2 web-text-xsmall"
|
||||
width={"fit-content"}
|
||||
placement="top"
|
||||
hasArrow
|
||||
label={item?.sub_heading}
|
||||
bg="blue.200"
|
||||
>
|
||||
<Box display={"flex"} alignItems={"center"} w={180} ><Text as={'span'} isTruncated={true}>{item?.CTO_button_title}</Text></Box></Tooltip>,
|
||||
Active: (
|
||||
<Switch
|
||||
size={"sm"}
|
||||
|
||||
@@ -48,6 +48,7 @@ const EditBlogsAndArticles = () => {
|
||||
const [smallImageData, setSmallImageData] = useState({});
|
||||
const [chips, setChips] = useState();
|
||||
|
||||
console.log(error);
|
||||
|
||||
const [valueQuill, setValueQuill] = useState(blog?.content);
|
||||
|
||||
@@ -73,7 +74,6 @@ const EditBlogsAndArticles = () => {
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (data?.data) {
|
||||
setSelectedImage(`https://rubix.betadelivery.com/${blog?.profile_image}`);
|
||||
@@ -129,7 +129,7 @@ const EditBlogsAndArticles = () => {
|
||||
console.log("Mutation response:", response?.error?.status);
|
||||
console.log("Mutation response:", response?.data?.statusCode);
|
||||
console.log("Mutation response:", response?.data?.message);
|
||||
console.log(response);
|
||||
console.log(response?.error?.status?.error?.message);
|
||||
|
||||
if (response?.data?.statusCode === 201) {
|
||||
setIsLoading01(false);
|
||||
@@ -143,7 +143,7 @@ const EditBlogsAndArticles = () => {
|
||||
});
|
||||
reset();
|
||||
navigate("/blogs-articles");
|
||||
}else if(response?.error?.status === 500){
|
||||
} else if (response?.error?.status === 500) {
|
||||
setIsLoading01(false);
|
||||
toast({
|
||||
render: () => (
|
||||
@@ -153,7 +153,13 @@ const EditBlogsAndArticles = () => {
|
||||
/>
|
||||
),
|
||||
});
|
||||
|
||||
} else {
|
||||
setIsLoading01(false);
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"error"} message={"File size too large"} />
|
||||
),
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -193,7 +199,6 @@ const EditBlogsAndArticles = () => {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if (isLoading) {
|
||||
return <FullscreenLoaders />;
|
||||
}
|
||||
@@ -209,9 +214,6 @@ const EditBlogsAndArticles = () => {
|
||||
>
|
||||
<Header title={"Blog"} />
|
||||
<form className="w-100" onSubmit={handleSubmit(onSubmit)}>
|
||||
|
||||
|
||||
|
||||
<Box display={"flex"}>
|
||||
<Box className="col-5 d-flex flex-column justify-content-between gap-2 pt-4">
|
||||
<Box flexDirection={"column"} display={"flex"}>
|
||||
@@ -240,7 +242,7 @@ const EditBlogsAndArticles = () => {
|
||||
className="d-flex w-100 p-2 justify-content-center flex-column align-items-center gap-3"
|
||||
>
|
||||
{false ? (
|
||||
<FormControl className="mb-3">
|
||||
<FormControl className="mb-3">
|
||||
{/* <FormLabel className="web-text-large fw-bold rubix-text-dark">
|
||||
Display profile
|
||||
</FormLabel> */}
|
||||
@@ -587,8 +589,8 @@ const EditBlogsAndArticles = () => {
|
||||
</Box>
|
||||
|
||||
<Divider />
|
||||
|
||||
<Box display={"flex"}>
|
||||
|
||||
<Box display={"flex"}>
|
||||
<Box className="col-5 d-flex flex-column gap-2 pt-4">
|
||||
{/* <span className="web-text-large fw-bold rubix-text-dark">
|
||||
Author's Info
|
||||
@@ -788,7 +790,7 @@ const EditBlogsAndArticles = () => {
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
</form>
|
||||
</Box>
|
||||
);
|
||||
|
||||
@@ -101,6 +101,13 @@ const ComunityEditPage = () => {
|
||||
});
|
||||
navigate("/community");
|
||||
// setDeleteAlert(false);
|
||||
} else {
|
||||
setIsLoading01(false);
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"error"} message={"File size too large"} />
|
||||
),
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
@@ -30,7 +30,7 @@ const ComunityViewPage = () => {
|
||||
<Header
|
||||
title={"Banner's"}
|
||||
btnTitle={"Edit banner"}
|
||||
link={`community/view/${id}`}
|
||||
link={`/community/edit/${id}`}
|
||||
/>
|
||||
<Box display={"flex"}>
|
||||
<Box className="col-5 d-flex flex-column gap-2 pt-4">
|
||||
|
||||
@@ -251,6 +251,12 @@ export const rubixApi = createApi({
|
||||
}),
|
||||
getBlogById: builder.query({
|
||||
query: (id) => `/admin/blog/${id}`,
|
||||
transformResponse: (response) => {
|
||||
if (response.error) {
|
||||
throw new Error(response.error.message);
|
||||
}
|
||||
return response;
|
||||
},
|
||||
providesTags: ["getBlogById"],
|
||||
}),
|
||||
createBlog: builder.mutation({
|
||||
|
||||
Reference in New Issue
Block a user