From 073fc8fe92e60fd4662580e8216600379a0edfae Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 14 Apr 2025 03:13:02 -0700 Subject: chore: refactor id to game title conversion to shared module --- site/src/utils.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 site/src/utils.ts (limited to 'site/src/utils.ts') diff --git a/site/src/utils.ts b/site/src/utils.ts new file mode 100644 index 0000000..e523f5c --- /dev/null +++ b/site/src/utils.ts @@ -0,0 +1,10 @@ +export const getGameTitle = (gameId: string) => { + if (!gameId) return null; + + if (gameId.startsWith("sdvx")) return "SOUND VOLTEX"; + if (gameId.startsWith("iidx")) return "beatmania IIDX"; + if (gameId.startsWith("chunithm_jp")) return "CHUNITHM (JAPAN)"; + if (gameId.startsWith("maimaidx_jp")) return "maimai DX (JAPAN)"; + + return gameId.toUpperCase(); +}; -- cgit v1.2.3