-
+
diff --git a/src/app/blog/_components/PostSection/PostSectionMain/ViewModalButton.tsx b/src/app/blog/_components/PostSection/PostSectionMain/ViewModalButton.tsx
index ccba4e7..f741588 100644
--- a/src/app/blog/_components/PostSection/PostSectionMain/ViewModalButton.tsx
+++ b/src/app/blog/_components/PostSection/PostSectionMain/ViewModalButton.tsx
@@ -1,51 +1,61 @@
-import ModalTriggerButton from "@/components/ModalTriggerButton";
-import { memo } from "react";
-import { CurrentView } from ".";
-import { POSTSECTION_TEXT } from "..";
-
-// 목록 / 본문 보기 버튼 컴포넌트
-interface ViewModalButtonProps {
- currentView: CurrentView;
- onClick: (view: CurrentView) => void;
-}
-
-const ViewModalButton = ({ onClick, currentView }: ViewModalButtonProps) => {
- const viewButtonItems = POSTSECTION_TEXT.main.viewButtonItems;
-
- return (
-
- {viewButtonItems.map((item) => (
-
- ))}
-
- );
-};
-
-export default memo(ViewModalButton);
+import ModalTriggerButton from "@/components/ModalTriggerButton";
+import { CurrentView } from ".";
+import { POSTSECTION_TEXT } from "..";
+
+interface ViewModalButtonProps {
+ currentView: CurrentView;
+ onClick: (view: CurrentView) => void;
+}
+
+const ViewModalButton = ({ onClick, currentView }: ViewModalButtonProps) => {
+ const viewButtonItems = POSTSECTION_TEXT.main.viewButtonItems;
+
+ return (
+
+
+ {viewButtonItems.map((item) => {
+ const isSelected = currentView.text === item.text;
+
+ return (
+
+ );
+ })}
+
+
+ );
+};
+
+export default ViewModalButton;
diff --git a/src/app/blog/_components/PostSection/PostSectionMain/index.tsx b/src/app/blog/_components/PostSection/PostSectionMain/index.tsx
index 8086770..9b9e977 100644
--- a/src/app/blog/_components/PostSection/PostSectionMain/index.tsx
+++ b/src/app/blog/_components/PostSection/PostSectionMain/index.tsx
@@ -1,5 +1,5 @@
import type { Post } from "@/types/posts.types";
-import { JSX, memo, Suspense, useCallback, useState } from "react";
+import { JSX, Suspense, useCallback, useState } from "react";
import { POSTSECTION_TEXT } from "..";
import ArticleViewPost from "./ArticleViewPost";
import ListViewPost from "./ListViewPost";
@@ -61,4 +61,4 @@ const PostSectionMain = ({ posts, searchText }: PostSectionMainProps) => {
);
};
-export default memo(PostSectionMain);
+export default PostSectionMain;
diff --git a/src/app/blog/_components/PostSection/index.tsx b/src/app/blog/_components/PostSection/index.tsx
index c528ced..9e41f7a 100644
--- a/src/app/blog/_components/PostSection/index.tsx
+++ b/src/app/blog/_components/PostSection/index.tsx
@@ -5,7 +5,7 @@ import ArrowHeadSVG from "@/svg/ArrowHeadSVG";
import ArticleSVG from "@/svg/ArticleSVG";
import ListSVG from "@/svg/ListSVG";
import SearchSVG from "@/svg/SearchSVG";
-import type { CategoryList, Post } from "@/types/posts.types";
+import type { Category, Post } from "@/types/posts.types";
import { useCallback, useMemo, useState } from "react";
import PostSectionHeader from "./PostSectionHeader";
import PostSectionMain from "./PostSectionMain";
@@ -50,7 +50,7 @@ const DefaultSort = POSTSECTION_TEXT.header.sortButton.sort[0];
interface PostSectionProps {
posts: Post[];
- categorys: CategoryList;
+ categorys: Category[];
}
const PostSection = ({ posts, categorys }: PostSectionProps) => {
@@ -106,7 +106,7 @@ const PostSection = ({ posts, categorys }: PostSectionProps) => {
currentSort === DefaultSort ? filteredPosts : [...filteredPosts].reverse();
return (
-
+
{
+ return (
+
+
+
+ {postCount} posts
+
+ {lastUpdated} 업데이트
+
+
+ );
+};
+
+export default SeriesCard;
diff --git a/src/app/blog/_components/SeriesAside/index.tsx b/src/app/blog/_components/SeriesAside/index.tsx
index 61b8cd0..a9eb479 100644
--- a/src/app/blog/_components/SeriesAside/index.tsx
+++ b/src/app/blog/_components/SeriesAside/index.tsx
@@ -1,68 +1,37 @@
"use client";
-import KeyboardArrowSVG from "@/svg/ArrowHeadSVG";
-import type { SeriesGroup } from "@/types/posts.types";
-import Link from "next/link";
-import { useState } from "react";
-
-interface SeriesCardProps {
- series: SeriesGroup;
-}
-
-const SeriesCard = ({ series }: SeriesCardProps) => {
- const [isOpen, setIsOpen] = useState(false);
-
- const toggleDropdown = () => setIsOpen((prev) => !prev);
-
- return (
-
-
- {series.series}
-
-
-
-
- {series.posts.map((el) => (
-
-
- {el.metadata.title}
-
-
- ))}
-
-
-
- );
-};
+import type { Series } from "@/types/posts.types";
+import SeriesCard from "./SeriesCard";
interface SeriesAsideProps {
- series: SeriesGroup[];
+ series: Series[];
}
const SeriesAside = ({ series }: SeriesAsideProps) => {
return (
-