import { Link, useSearchParams } from "react-router-dom"; import TitleBar from "../components/TitleBar"; import { useTranslation } from "react-i18next"; interface GameCategory { name: string; description: string; games: { id: string; title: string }[]; } const gameInfo: GameCategory[] = [ { name: "KONAMI", description: "", games: [ { id: "iidx", title: "beatmania IIDX" }, { id: "sdvx", title: "SOUND VOLTEX" }, { id: "ddr", title: "DanceDanceRevolution" }, { id: "jubeat", title: "jubeat" }, { id: "popn_music", title: "pop'n music" }, { id: "nostalgia", title: "NOSTALGIA" }, { id: "gitadora", title: "GITADORA" }, { id: "dance_rush", title: "DANCERUSH" }, { id: "dance_around", title: "DANCE aROUND" }, { id: "polaris_chord", title: "POLARIS CHORD" }, ], }, { name: "SEGA", description: "", games: [ { id: "chunithm_jp", title: "CHUNITHM (JAPAN)" }, { id: "chunithm_intl", title: "CHUNITHM (INTERNATIONAL)" }, { id: "maimaidx_jp", title: "maimai DX (JAPAN)" }, { id: "maimaidx_intl", title: "maimai DX (INTERNATIONAL)" }, { id: "ongeki_jp", title: "O.N.G.E.K.I" }, { id: "idac", title: "INITIAL D (頭文字D)" }, ], }, { name: "TAITO", description: "", games: [ { id: "music_diver", title: "MUSIC DIVER" }, { id: "street_fighter", title: "STREET FIGHTER" }, ], }, { name: "BANDAI NAMCO", description: "", games: [ { id: "taiko", title: "Taiko no Tatsujin" }, { id: "wmmt", title: "WANGAN MIDNIGHT MAXIMUM TUNE" }, ], }, { name: "COMMUNITY", description: "Community-driven projects to continue the legacy of dead/abandoned rhythm games", games: [ { id: "wacca_plus", title: "WACCA PLUS" }, { id: "museca_plus", title: "MÚSECA PLUS" }, { id: "rb_deluxe_plus", title: "REFLEC BEAT DELUXE PLUS" }, ], }, ]; const GameSelector = () => { const [searchParams] = useSearchParams(); const isMoe = searchParams.has("moe"); const { t } = useTranslation(); const renderCategory = (category: GameCategory) => (

{t(`gameselector.categories.${category.name.toLowerCase().replace(' ', '_')}`)}

{category.name === "COMMUNITY" ? t('gameselector.community_description') : category.description}

{category.games.map((game) => ( {game.title} ))}
); return ( <>

{t('gameselector.title')}

{t('gameselector.subtitle')}

{gameInfo.map(renderCategory)}
); }; export default GameSelector;