{String(scoreRanking.rank)}
|
- {scoreRanking.user.studentNumber}
+ {scoreRanking.score?.user?.student_number}
|
- {String(scoreRanking.keystrokes)}
+ {String(scoreRanking.score?.keystrokes)}
|
- {String(scoreRanking.accuracy)}
+ {formattedAccuracy}
|
- {scoreRanking.createdAt.toLocaleDateString("ja-JP")}
+ {formattedCreatedAt}
|
);
diff --git a/typing-app/src/components/organism/RankingTabs.tsx b/typing-app/src/components/organism/RankingTabs.tsx
index b5aaea8..c02e63e 100644
--- a/typing-app/src/components/organism/RankingTabs.tsx
+++ b/typing-app/src/components/organism/RankingTabs.tsx
@@ -1,51 +1,56 @@
"use client";
+
import { Tabs, TabList, TabPanels, Tab, TabPanel, Flex, Center, Box, Grid } from "@chakra-ui/react";
import RankingTable from "../organism/RankingTable";
import { Pagination } from "../molecules/Pagination";
-//import { CustomButton } from "../atoms/CustomButton";
import RefreshButton from "../atoms/RefreshButton";
import { useEffect, useState } from "react";
-// import { client } from "@/libs/api";
+import { client } from "@/libs/api";
+import { components } from "@/libs/api/v1";
const RankingTabs = () => {
- const [scoreRankings, setScoreRankings] = useState