diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-05 20:52:43 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-05 20:53:02 +0900 |
| commit | 82d3cf35c3c6b85b48c94dd6301c8bf718669b8d (patch) | |
| tree | c09c53a3ae1f51aba02902d4f32ffafdf7fb562a /frontend/app/components/Gaming/RankingTable.tsx | |
| parent | dd1c68425120fca008a3b10991c865ea586c7002 (diff) | |
| download | iosdc-japan-2025-albatross-82d3cf35c3c6b85b48c94dd6301c8bf718669b8d.tar.gz iosdc-japan-2025-albatross-82d3cf35c3c6b85b48c94dd6301c8bf718669b8d.tar.zst iosdc-japan-2025-albatross-82d3cf35c3c6b85b48c94dd6301c8bf718669b8d.zip | |
feat(frontend): support swift language
Diffstat (limited to 'frontend/app/components/Gaming/RankingTable.tsx')
| -rw-r--r-- | frontend/app/components/Gaming/RankingTable.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/frontend/app/components/Gaming/RankingTable.tsx b/frontend/app/components/Gaming/RankingTable.tsx index 3368f60..7359d40 100644 --- a/frontend/app/components/Gaming/RankingTable.tsx +++ b/frontend/app/components/Gaming/RankingTable.tsx @@ -1,6 +1,7 @@ import { useAtomValue } from "jotai"; import React from "react"; import { rankingAtom } from "../../states/watch"; +import type { SupportedLanguage } from "../../types/SupportedLanguage"; import CodePopover from "./CodePopover"; function TableHeaderCell({ children }: { children: React.ReactNode }) { @@ -29,7 +30,11 @@ function formatUnixTimestamp(timestamp: number) { return `${year}-${month}-${day} ${hours}:${minutes}`; } -export default function RankingTable() { +type Props = { + problemLanguage: SupportedLanguage; +}; + +export default function RankingTable({ problemLanguage }: Props) { const ranking = useAtomValue(rankingAtom); return ( @@ -57,7 +62,9 @@ export default function RankingTable() { {formatUnixTimestamp(entry.submitted_at)} </TableBodyCell> <TableBodyCell> - {entry.code && <CodePopover code={entry.code} />} + {entry.code && ( + <CodePopover code={entry.code} language={problemLanguage} /> + )} </TableBodyCell> </tr> ))} |
