Skip to content

Commit

Permalink
Fix: SgYear
Browse files Browse the repository at this point in the history
  • Loading branch information
happycastle114 committed Nov 30, 2023
1 parent c8e7dbf commit 9f8d8cb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/organisms/NationalCouncilReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ const NationalCouncilReport = ({

if (sgType === "candidate") {
axios
.get(
`nationalCouncil/template-data?year=${sgYear}&year=${sgYear}&factor=party`,
)
.get(`nationalCouncil/template-data?year=${sgYear}&factor=party`)
.then(response => {
const data = response.data as PartyTextData;
const newPartyPieChartData: PieChartData[] = [];
Expand Down Expand Up @@ -219,7 +217,7 @@ const NationalCouncilReport = ({
});
} else {
axios
.get(`nationalCouncil/chart-data?factor=party`)
.get(`nationalCouncil/chart-data?factor=party&year=${sgYear}`)
.then(response => {
const data = response.data.data as PartyPieChartDataAPIResponse;
const newPartyPieChartData: PieChartData[] = [];
Expand All @@ -235,7 +233,7 @@ const NationalCouncilReport = ({
throw new Error("네트워크 문제가 발생했습니다. 다시 시도해주세요.");
});
axios
.get(`nationalCouncil/chart-data?factor=gender`)
.get(`nationalCouncil/chart-data?factor=gender&year=${sgYear}`)
.then(response => {
const data = response.data.data as GenderPieChartDataAPIResponse;
const newGenderPieChartData: PieChartData[] = [];
Expand Down

0 comments on commit 9f8d8cb

Please sign in to comment.