Skip to content

Commit

Permalink
feat: 챌린지 문제 순서 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ymj07168 committed Oct 29, 2024
1 parent 622771f commit e9a7798
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions src/pages/ChallengePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ const ChallengePage = () => {
day: "numeric",
});

// useEffect(() => {
// getChallengeDetail({ challengeId: challengeId }).then((res) => {
// // console.log(res.data)
// setChallengeDetail(res.data);
// });
// }, [challengeId]);

return (
<>
<Header />
Expand Down Expand Up @@ -53,16 +46,19 @@ const ChallengePage = () => {
/>
</div>
) : (
challengeDetail?.map((problem) => (
<ProblemCard
problemId={problem.id}
title={problem.title}
site={problem.site}
siteKinds={problem.siteKinds}
level={problem.level}
isLoading={isLoading}
/>
))
challengeDetail
?.slice()
.reverse()
.map((problem) => (
<ProblemCard
problemId={problem.id}
title={problem.title}
site={problem.site}
siteKinds={problem.siteKinds}
level={problem.level}
isLoading={isLoading}
/>
))
)}
</div>
</PageContainer>
Expand Down

0 comments on commit e9a7798

Please sign in to comment.