diff --git a/src/app/news/eduOffice/page.tsx b/src/app/news/eduOffice/page.tsx
index 85fdf7e..2c95fc4 100644
--- a/src/app/news/eduOffice/page.tsx
+++ b/src/app/news/eduOffice/page.tsx
@@ -31,6 +31,7 @@ const EduOffice = () => {
.then((response) => {
const summaryData = response.data.educationOfficeAnnouncementInfos;
setSummaryData(summaryData);
+ console.log(summaryData);
})
.catch((error) => {});
}, []);
@@ -72,7 +73,7 @@ const EduOffice = () => {
/>
- {summaryData && }
+ {summaryData && }
>
diff --git a/src/app/news/school/page.tsx b/src/app/news/school/page.tsx
index 4208f60..49f7ef2 100644
--- a/src/app/news/school/page.tsx
+++ b/src/app/news/school/page.tsx
@@ -73,7 +73,7 @@ const School = () => {
/>
- {summaryData && }
+ {summaryData && }
>
diff --git a/src/components/news/Summary.tsx b/src/components/news/Summary.tsx
index cb4f64c..f1c678e 100644
--- a/src/components/news/Summary.tsx
+++ b/src/components/news/Summary.tsx
@@ -21,13 +21,20 @@ interface AnnouncementsProps {
announcementId?: number;
}
-const Summary = ({ dummyData }: { dummyData: AnnouncementsProps[] }) => {
+const Summary = ({
+ type,
+ dummyData,
+}: {
+ type: string;
+ dummyData: AnnouncementsProps[];
+}) => {
return (
가정통신문, 세 문장 요약해드려요
{dummyData.map((data, index) => (
{
const {
- type = "school",
+ type,
summaryType = "simple",
isNew,
category,
@@ -54,7 +54,7 @@ const SummaryCard = (props: AnnouncementsProps) => {
const router = useRouter();
- const handleCardClick = (announcementId: number) => {
+ const handleCardClick = (type: string, announcementId: number) => {
router.push(`/news/${type}/${announcementId}`);
};
@@ -62,8 +62,8 @@ const SummaryCard = (props: AnnouncementsProps) => {
handleCardClick(announcementId)
+ summaryType === "simple" && type && announcementId
+ ? () => handleCardClick(type, announcementId)
: undefined
}
>