page.tsx 530 B

12345678910111213141516171819
  1. import { fetchJson } from '@/lib/utils/server';
  2. import type { GameListResponse } from '@/types/response/store/game';
  3. import GamesExplorer from './GamesExplorer';
  4. export const metadata = {
  5. title: '게임'
  6. };
  7. export default async function GamesPage()
  8. {
  9. const res = await fetchJson<GameListResponse>('/api/store/games/list', { method: 'GET' });
  10. const games = res.success && res.data ? res.data.games : [];
  11. return (
  12. <div className="mx-auto w-full max-w-screen-2xl px-4 py-6">
  13. <GamesExplorer games={games} />
  14. </div>
  15. );
  16. }