diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-04-14 03:13:02 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-04-14 03:13:02 -0700 |
| commit | 073fc8fe92e60fd4662580e8216600379a0edfae (patch) | |
| tree | 4a78d028fd78af8d30584df24bbfc164e1de9896 /site/src/utils.ts | |
| parent | 7b93b8587d93d8f86ac8d8e25c589bba02c20476 (diff) | |
chore: refactor id to game title conversion to shared module
Diffstat (limited to 'site/src/utils.ts')
| -rw-r--r-- | site/src/utils.ts | 10 |
1 files changed, 10 insertions, 0 deletions
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(); +}; |
