diff --git a/src/app/blogs/components/BigBlogItem.tsx b/src/app/blogs/components/BigBlogItem.tsx index 9d97148..7906889 100644 --- a/src/app/blogs/components/BigBlogItem.tsx +++ b/src/app/blogs/components/BigBlogItem.tsx @@ -12,11 +12,11 @@ interface BigBlogItemProps { const BigBlogItem: FC = ({ item }) => { return (
- + blog
- +

{item.title}

@@ -47,7 +47,7 @@ const BigBlogItem: FC = ({ item }) => { {item.previewContent.replace(/<\/?[^>]+(>|$)/g, "")}
- +
ادامه ی مطلب
= ({ item }) => { return (
- + {item.title} = ({ item }) => { /> - +
{item.title}
diff --git a/src/app/blogs/service/BlogService.ts b/src/app/blogs/service/BlogService.ts index 4a3a8de..ade3d0a 100644 --- a/src/app/blogs/service/BlogService.ts +++ b/src/app/blogs/service/BlogService.ts @@ -37,7 +37,7 @@ export const getCombinedBlogs = async () => { return data; }; -export const getBlogSingle = async (id: string) => { - const { data } = await axios.get(`/blogs/${id}`); +export const getBlogSingle = async (slug: string) => { + const { data } = await axios.get(`/blogs/slug/${slug}`); return data; }; diff --git a/src/components/BlogItem.tsx b/src/components/BlogItem.tsx index 4194f4e..08f24b7 100644 --- a/src/components/BlogItem.tsx +++ b/src/components/BlogItem.tsx @@ -9,7 +9,7 @@ interface Props { const BlogItem: FC = ({ item }) => { return ( - + { @@ -35,7 +36,7 @@ const SideBar: FC = () => { logo
-
+
منو
@@ -90,6 +91,19 @@ const SideBar: FC = () => { link={'/blogs'} /> + } + title={'تماس با ما'} + isActive={isActive('contact')} + link={'/contact'} + /> + +
+ +
+