Skip to content

Commit

Permalink
Fix SUAPC mobile button links
Browse files Browse the repository at this point in the history
  • Loading branch information
2093ab authored and derug committed Oct 9, 2023
1 parent 68c6c41 commit 9533c21
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
4 changes: 4 additions & 0 deletions components/ArchiveButton/ArchiveButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ const CustomButton = styled.div`
background-color: #eeeeee;
color: #aaaaaa;
border: none;
@media (max-width: 766px) {
background-color: transparent;
}
`}
@media (max-width: 766px) {
Expand Down
35 changes: 25 additions & 10 deletions pages/suapc.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,30 +308,45 @@ const Suapc = () => {
{currentSeasonData.awards && (
<ItemWrap className="show-if-mobile" css={ArchiveWrap}>
<ArchiveButton
disabled={!Boolean(currentSeasonData.links.bojProblem)}
href={currentSeasonData.links.bojProblem}
>
문제(BOJ 링크)
</ArchiveButton>
<ArchiveButton
disabled={!Boolean(currentSeasonData.fileNames.testPdf)}
disabledText="문제 PDF가 제공되지 않는 대회입니다."
href={`https://api.suapc.kr/${currentYear}${
currentSeason === "Winter" ? "w" : "s"
}/problem`}
}/${currentSeasonData.fileNames.testPdf}`}
>
문제 PDF
</ArchiveButton>
<ArchiveButton
href={`https://api.suapc.kr/${currentYear}${
currentSeason === "Winter" ? "w" : "s"
}/solution`}
disabled={!Boolean(currentSeasonData.fileNames.solutionPdf)}
href={
(currentSeasonIdx !== 0 ? "https://api.suapc.kr/" : "/res/") +
`${currentYear}${currentSeason === "Winter" ? "w" : "s"}/${
currentSeasonData.fileNames.solutionPdf
}`
}
>
해설 PDF
</ArchiveButton>
<ArchiveButton
href={`https://api.suapc.kr/${currentYear}${
currentSeason === "Winter" ? "w" : "s"
}/scoreboard`}
disabled={!Boolean(currentSeasonData.links.scoreboard)}
href={currentSeasonData.links.scoreboard}
>
스코어보드
</ArchiveButton>
<ArchiveButton
href={`https://api.suapc.kr/${currentYear}${
currentSeason === "Winter" ? "w" : "s"
}/poster`}
disabled={!Boolean(currentSeasonData.fileNames.posterImage)}
href={
(currentSeasonIdx !== 0 ? "https://api.suapc.kr/" : "/res/") +
`${currentYear}${currentSeason === "Winter" ? "w" : "s"}/${
currentSeasonData.fileNames.posterImage
}`
}
>
공식 포스터
</ArchiveButton>
Expand Down

0 comments on commit 9533c21

Please sign in to comment.