diff --git a/src/app/(landing-routes)/blog/[id]/BlogDetailsPage.tsx b/src/app/(landing-routes)/blog/[id]/BlogDetailsPage.tsx index de2c2d29e..570b6bae0 100644 --- a/src/app/(landing-routes)/blog/[id]/BlogDetailsPage.tsx +++ b/src/app/(landing-routes)/blog/[id]/BlogDetailsPage.tsx @@ -7,8 +7,10 @@ import Link from "next/link"; import { useSearchParams } from "next/navigation"; import { useEffect, useState } from "react"; -import Comment, { CommentProperties } from "~/components/common/Comment"; -import { sampleComments } from "~/components/common/Comment/sample-comments"; +import Comment, { + CommentProperties, +} from "~/components/common/comment-component"; +import { sampleComments } from "~/components/common/comment-component/sample-comments"; import LoadingSpinner from "~/components/miscellaneous/loading-spinner"; import RelatedArticle from "./RelatedArticle"; diff --git a/src/app/(landing-routes)/blog/[id]/RelatedArticle.tsx b/src/app/(landing-routes)/blog/[id]/RelatedArticle.tsx index c5796aa1d..7620c3484 100644 --- a/src/app/(landing-routes)/blog/[id]/RelatedArticle.tsx +++ b/src/app/(landing-routes)/blog/[id]/RelatedArticle.tsx @@ -1,7 +1,7 @@ import { useRouter } from "next/navigation"; import BlogCard from "~/components/layouts/BlogCards"; -import { blogPosts } from "../page"; +import { blogPosts } from "../data/mock"; export type New = { id: number; diff --git a/src/app/(landing-routes)/blog/comments/page.tsx b/src/app/(landing-routes)/blog/comments/page.tsx index 7f42c1e24..7348e7882 100644 --- a/src/app/(landing-routes)/blog/comments/page.tsx +++ b/src/app/(landing-routes)/blog/comments/page.tsx @@ -1,7 +1,7 @@ import { Session } from "next-auth"; -import Comment from "~/components/common/comment"; -import { sampleComments } from "~/components/common/comment/sample-comments"; +import Comment from "~/components/common/comment-component"; +import { sampleComments } from "~/components/common/comment-component/sample-comments"; const CommentPage = () => { const mockSession: Session = { diff --git a/src/app/(landing-routes)/blog/data/mock.ts b/src/app/(landing-routes)/blog/data/mock.ts new file mode 100644 index 000000000..7b4c6767d --- /dev/null +++ b/src/app/(landing-routes)/blog/data/mock.ts @@ -0,0 +1,65 @@ +import { + blogCard1, + blogCard2, + blogCard3, + blogCard4, + blogCard5, + blogCard6, +} from "../../../../../public/images/blogPage/utils"; + +export const blogPosts = [ + { + id: 1, + title: "The Power of Networking: How to Build Meaningful Connections", + date: "Jul 12, 2024", + readTime: "5", + category: "Business", + image: blogCard1, + labelClassName: "bg-primary", + }, + { + id: 2, + title: "The Global Impact of Climate Change: A Look at the Evidence", + date: "Jul 12, 2024", + readTime: "5", + category: "World News", + image: blogCard2, + labelClassName: "bg-warning", + }, + { + id: 3, + title: "5 Easy and Delicious Recipes for Busy Weeknights", + date: "Jul 12, 2024", + readTime: "5", + category: "Food", + image: blogCard3, + labelClassName: "bg-success", + }, + { + id: 4, + title: "5 Simple Habits to Improve Your Mental Wellbeing", + date: "Jul 12, 2024", + readTime: "5", + category: "Lifestyle", + image: blogCard4, + labelClassName: "bg-primary", + }, + { + id: 5, + title: "The Ultimate Guide to Dressing Stylishly with Fewer Clothes", + date: "Jul 12, 2024", + readTime: "5", + category: "Fashion", + image: blogCard5, + labelClassName: "bg-success", + }, + { + id: 6, + title: "The Future of Travel: What Will the World Look Like in 2030?", + date: "Jul 12, 2024", + readTime: "5", + category: "World News", + image: blogCard6, + labelClassName: "bg-warning", + }, +]; diff --git a/src/app/(landing-routes)/blog/page.tsx b/src/app/(landing-routes)/blog/page.tsx index 43d5a03c4..7d9e541d9 100644 --- a/src/app/(landing-routes)/blog/page.tsx +++ b/src/app/(landing-routes)/blog/page.tsx @@ -1,67 +1,9 @@ import CustomButton from "~/components/common/common-button/common-button"; import BlogCard from "~/components/layouts/BlogCards"; -import { - blogCard1, - blogCard2, - blogCard3, - blogCard4, - blogCard5, - blogCard6, -} from "../../../../public/images/blogPage/utils"; import HeroSection from "../../../components/extDynamicPages/blogCollection/BlogPageHero"; +import { blogPosts } from "./data/mock"; const BlogHome = () => { - const blogPosts = [ - { - title: "The Power of Networking: How to Build Meaningful Connections", - date: "Jul 12, 2024", - readTime: "5", - category: "Business", - image: blogCard1, - labelClassName: "bg-primary", - }, - { - title: "The Global Impact of Climate Change: A Look at the Evidence", - date: "Jul 12, 2024", - readTime: "5", - category: "World News", - image: blogCard2, - labelClassName: "bg-warning", - }, - { - title: "5 Easy and Delicious Recipes for Busy Weeknights", - date: "Jul 12, 2024", - readTime: "5", - category: "Food", - image: blogCard3, - labelClassName: "bg-success", - }, - { - title: "5 Simple Habits to Improve Your Mental Wellbeing", - date: "Jul 12, 2024", - readTime: "5", - category: "Lifestyle", - image: blogCard4, - labelClassName: "bg-primary", - }, - { - title: "The Ultimate Guide to Dressing Stylishly with Fewer Clothes", - date: "Jul 12, 2024", - readTime: "5", - category: "Fashion", - image: blogCard5, - labelClassName: "bg-success", - }, - { - title: "The Future of Travel: What Will the World Look Like in 2030?", - date: "Jul 12, 2024", - readTime: "5", - category: "World News", - image: blogCard6, - labelClassName: "bg-warning", - }, - ]; - return (