aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/Gaming/RankingTable.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-05 20:52:43 +0900
committernsfisis <nsfisis@gmail.com>2025-09-05 20:53:02 +0900
commit82d3cf35c3c6b85b48c94dd6301c8bf718669b8d (patch)
treec09c53a3ae1f51aba02902d4f32ffafdf7fb562a /frontend/app/components/Gaming/RankingTable.tsx
parentdd1c68425120fca008a3b10991c865ea586c7002 (diff)
downloadiosdc-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.tsx11
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>
))}