diff --git a/src/components/molecules/LocalCouncilReportText/PartyText.tsx b/src/components/molecules/LocalCouncilReportText/PartyText.tsx
index 66439a6..2ea9715 100644
--- a/src/components/molecules/LocalCouncilReportText/PartyText.tsx
+++ b/src/components/molecules/LocalCouncilReportText/PartyText.tsx
@@ -146,7 +146,7 @@ export const PartyText = ({
명의 당선자가 나왔어요.{" "}
>
) : null}
- {independentCount !== 0 ? (
+ {independentCount ? (
// 무소속 당선자가 있으면 아래 텍스트 추가
<>
diff --git a/src/components/molecules/MetroCouncilReportText/PartyText.tsx b/src/components/molecules/MetroCouncilReportText/PartyText.tsx
index a3ef66d..d9da0b2 100644
--- a/src/components/molecules/MetroCouncilReportText/PartyText.tsx
+++ b/src/components/molecules/MetroCouncilReportText/PartyText.tsx
@@ -137,7 +137,7 @@ export const PartyText = ({
명의 당선자가 나왔어요.{" "}
>
) : null}
- {independentCount !== 0 ? (
+ {independentCount ? (
// 무소속 당선자가 있으면 아래 텍스트 추가
<>
diff --git a/src/components/molecules/NationalCouncilReportText/PartyText.tsx b/src/components/molecules/NationalCouncilReportText/PartyText.tsx
index 9b7eaa4..738a830 100644
--- a/src/components/molecules/NationalCouncilReportText/PartyText.tsx
+++ b/src/components/molecules/NationalCouncilReportText/PartyText.tsx
@@ -142,7 +142,7 @@ export const PartyText = ({
명의 당선자가 나왔어요.{" "}
>
) : null}
- {independentCount !== 0 ? (
+ {independentCount ? (
// 무소속 당선자가 있으면 아래 텍스트 추가
<>
diff --git a/src/components/organisms/ReportIntro.tsx b/src/components/organisms/ReportIntro.tsx
index 58d9904..e078cde 100644
--- a/src/components/organisms/ReportIntro.tsx
+++ b/src/components/organisms/ReportIntro.tsx
@@ -1,13 +1,24 @@
import { Typography } from "antd";
import { css } from "@emotion/react";
-import { useLocalElectionYears } from "@/utils";
+import { useLocalElectionYears, useNationalElectionYears } from "@/utils";
const { Title, Paragraph, Text } = Typography;
-const ReportIntro = () => {
+interface Props {
+ reportType: string;
+}
+
+const ReportIntro = ({ reportType }: Props) => {
const localElectionYears = useLocalElectionYears();
- const firstElection = localElectionYears[0];
- const lastElection = localElectionYears[localElectionYears.length - 1];
+ const nationalElectionYears = useNationalElectionYears();
+ const firstElection =
+ reportType === "nationalCouncil"
+ ? nationalElectionYears[0]
+ : localElectionYears[0];
+ const lastElection =
+ reportType === "nationalCouncil"
+ ? nationalElectionYears[nationalElectionYears.length - 1]
+ : localElectionYears[localElectionYears.length - 1];
return (
<>