From a313021c9e3b227d5ffbbd407f6a54a6e13ca82f Mon Sep 17 00:00:00 2001 From: Polaris Date: Fri, 16 Aug 2024 22:00:51 -0400 Subject: [PATCH] changed list into grid --- app/(authenticated)/chunithm/page.tsx | 4 +- components/userRatingBaseHotList/page.tsx | 8 +-- .../action.ts | 0 .../page.tsx | 51 +++++++++---------- 4 files changed, 31 insertions(+), 32 deletions(-) rename components/{userRatingBase => userRatingBaseList}/action.ts (100%) rename components/{userRatingBase => userRatingBaseList}/page.tsx (52%) diff --git a/app/(authenticated)/chunithm/page.tsx b/app/(authenticated)/chunithm/page.tsx index ce6761d..fcb3731 100644 --- a/app/(authenticated)/chunithm/page.tsx +++ b/app/(authenticated)/chunithm/page.tsx @@ -13,10 +13,10 @@ import { getSystemVoices } from "@/components/(customization)/systemvoicecustomi import { SystemVoiceCustomization } from "@/components/(customization)/systemvoicecustomization/page"; import { MapIconCustomization } from "@/components/(customization)/mapiconcustomization/page"; import { getMapIcons } from "@/components/(customization)/mapiconcustomization/actions"; -import { getUserRatingBaseList } from "@/components/userRatingBase/action"; +import { getUserRatingBaseList } from "@/components/userRatingBaseList/action"; import { ChunithmHotPlays } from "@/components/userRatingBaseHotList/page"; import { getUserRatingBaseHotList } from "@/components/userRatingBaseHotList/action"; -import { ChunithmTopPlays } from "@/components/userRatingBase/page"; +import { ChunithmTopPlays } from "@/components/userRatingBaseList/page"; const getChuniTopPlays = async () => { const topPlays = await getUserRatingBaseList(); diff --git a/components/userRatingBaseHotList/page.tsx b/components/userRatingBaseHotList/page.tsx index 83ad86f..670d59c 100644 --- a/components/userRatingBaseHotList/page.tsx +++ b/components/userRatingBaseHotList/page.tsx @@ -25,15 +25,15 @@ export const ChunithmHotPlays: FC = ({ chuniProfileHotPlays, }) => { return ( -
+
{chuniProfileHotPlays.hotRating.map((playerHotRatingList, index) => { const jacketPath = playerHotRatingList.jacketPath?.replace( ".dds", ".png", ); return ( -
-
{index + 1}.
+
+
{jacketPath && ( = ({ /> )}
-
    +
    • Title: {playerHotRatingList.title}
    • diff --git a/components/userRatingBase/action.ts b/components/userRatingBaseList/action.ts similarity index 100% rename from components/userRatingBase/action.ts rename to components/userRatingBaseList/action.ts diff --git a/components/userRatingBase/page.tsx b/components/userRatingBaseList/page.tsx similarity index 52% rename from components/userRatingBase/page.tsx rename to components/userRatingBaseList/page.tsx index 436a96d..451b780 100644 --- a/components/userRatingBase/page.tsx +++ b/components/userRatingBaseList/page.tsx @@ -25,48 +25,47 @@ type chunithmTopPlays = { topPlays: userRatingBaseList[]; }; }; + export const ChunithmTopPlays: FC = ({ chuniProfileTopPlays, }) => { return ( -
      +
      {chuniProfileTopPlays.topPlays.map((chuniProfileTopPlays, index) => { const jacketPath = chuniProfileTopPlays.jacketPath?.replace( ".dds", ".png", ); return ( -
      -
      {index + 1}.
      +
      +
      {jacketPath && ( Jacket )} -
      -
        -
      • - Title: {chuniProfileTopPlays.title} -
      • -
      • - Level: {chuniProfileTopPlays.level} -
      • -
      • - Difficulty: - {getDifficultyText(Number(chuniProfileTopPlays.chartId))} -
      • -
      • - Score: {" "} - {chuniProfileTopPlays.score?.toLocaleString()} -
      • -
      • - Rating: {" "} - {(chuniProfileTopPlays.rating / 100).toFixed(2)} -
      • -
      -
      +
        +
      • + Title: {chuniProfileTopPlays.title} +
      • +
      • + Level: {chuniProfileTopPlays.level} +
      • +
      • + Difficulty: {" "} + {getDifficultyText(Number(chuniProfileTopPlays.chartId))} +
      • +
      • + Score: {" "} + {chuniProfileTopPlays.score?.toLocaleString()} +
      • +
      • + Rating: {" "} + {(chuniProfileTopPlays.rating / 100).toFixed(2)} +
      • +
      ); })}