diff --git a/app/(root)/(pages)/blog/[blogId]/page.tsx b/app/(root)/(pages)/blog/[blogId]/page.tsx index fbea95d..176bbec 100644 --- a/app/(root)/(pages)/blog/[blogId]/page.tsx +++ b/app/(root)/(pages)/blog/[blogId]/page.tsx @@ -29,7 +29,7 @@ export default async function DynamicBlog({ params }: { params: { blogId: string const response = await getBlogDetails(blogId); return ( -
+
diff --git a/components/custom/blog/BlogActionButton.tsx b/components/custom/blog/BlogActionButton.tsx index cbca14d..ecfacd7 100644 --- a/components/custom/blog/BlogActionButton.tsx +++ b/components/custom/blog/BlogActionButton.tsx @@ -19,41 +19,31 @@ import {FaXTwitter} from "react-icons/fa6"; import {FaInstagram, FaLinkedin} from "react-icons/fa"; import BlogCommentDrawer from "@/components/custom/drawers/BlogCommentDrawer"; import BlogCommentMobileDrawer from "@/components/custom/drawers/BlogCommentMobileDrawer"; +import useMediaQuery from "@/hooks/useMediaQuery"; + +const BlogActionButton = ({data, isDividerShown = true}: { data: any, isDividerShown?: boolean }) => { + + const breakPoint = useMediaQuery(640); -const BlogActionButton = ({data, isDividerShown = true}: {data: any, isDividerShown?: boolean }) => { return (
{isDividerShown && }
-
+
10 - +
-
- - 10 - - -
- -
+
10 - + {breakPoint ? : }
@@ -70,7 +60,8 @@ const BlogActionButton = ({data, isDividerShown = true}: {data: any, isDividerSh
- + Copy Link
@@ -118,21 +109,21 @@ const BlogActionButton = ({data, isDividerShown = true}: {data: any, isDividerSh
- + Share on LinkedIn
- + Share on X
- + Share on Instagram
diff --git a/components/custom/blog/BlogCommentField.tsx b/components/custom/blog/BlogCommentField.tsx new file mode 100644 index 0000000..d173885 --- /dev/null +++ b/components/custom/blog/BlogCommentField.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import {Card, CardContent, CardFooter, CardHeader} from "@/components/ui/card"; +import {Avatar, Button} from "@nextui-org/react"; +import {useSelector} from "react-redux"; +import {RootState} from "@/state/store"; + +const BlogCommentField = () => { + + const {isAuthenticated} = useSelector((state: RootState) => state.auth); + const {name, profileImage} = useSelector((state: RootState) => state.profile); + + return ( +
+ {isAuthenticated && ( + + +
+ + {name} +
+
+ + +