From 913b11f3699169e077648ab9e23f17b642a34bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8F=99=ED=98=81?= <132553964+ddhelop@users.noreply.github.com> Date: Fri, 28 Jun 2024 14:01:07 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=88=AC=ED=91=9C=EC=88=9C=EB=8C=80?= =?UTF-8?q?=EB=A1=9C=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DemoDayVote/DemoDayVoteReult.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/DemoDayVote/DemoDayVoteReult.tsx b/src/components/DemoDayVote/DemoDayVoteReult.tsx index 2b577db..9f9d79a 100644 --- a/src/components/DemoDayVote/DemoDayVoteReult.tsx +++ b/src/components/DemoDayVote/DemoDayVoteReult.tsx @@ -18,6 +18,8 @@ export default function DemoDayVoteResult() { try { const response = await voteResult(accessToken); const result: VoteResult[] = await response.json(); + // 결과를 voteCount 순으로 정렬 + result.sort((a, b) => parseInt(b.voteCount) - parseInt(a.voteCount)); setVoteResults(result); } catch (error) { @@ -31,7 +33,6 @@ export default function DemoDayVoteResult() {