'use client'; import Link from 'next/link'; import { useState, useEffect } from 'react'; export default function GameSample() { const [onlinePlayers, setOnlinePlayers] = useState(48_219); const [matchingCount, setMatchingCount] = useState(1_342); const [matchingActive, setMatchingActive] = useState(false); const [matchTimer, setMatchTimer] = useState(0); useEffect(() => { const interval = setInterval(() => { setOnlinePlayers((p) => p + Math.floor(Math.random() * 6 - 2)); setMatchingCount((c) => c + Math.floor(Math.random() * 4 - 1)); }, 2000); return () => clearInterval(interval); }, []); useEffect(() => { let timer: ReturnType; if (matchingActive) { timer = setInterval(() => { setMatchTimer((t) => t + 1); }, 1000); } else { setMatchTimer(0); } return () => clearInterval(timer); }, [matchingActive]); const rankings = [ { rank: 1, name: 'ShadowViper_KR', score: 9_842, tier: 'GRANDMASTER', wins: 312, kda: '18.4' }, { rank: 2, name: 'NightFalcon', score: 9_610, tier: 'GRANDMASTER', wins: 289, kda: '15.2' }, { rank: 3, name: 'Xenon_X', score: 9_241, tier: 'MASTER', wins: 267, kda: '12.9' }, { rank: 4, name: 'KR_Dominator', score: 8_970, tier: 'MASTER', wins: 251, kda: '11.7' }, { rank: 5, name: 'Pulse_Wave', score: 8_834, tier: 'DIAMOND', wins: 238, kda: '10.3' }, ]; const modes = [ { id: 'solo', name: 'SOLO', sub: '1 vs 1', desc: '순수한 실력으로 맞붙는 1대1 대결', icon: '⚡', color: '#06b6d4', players: '12,400', }, { id: 'duo', name: 'DUO', sub: '2 vs 2', desc: '파트너와 함께하는 팀플레이', icon: '◈', color: '#a855f7', players: '28,700', }, { id: 'squad', name: 'SQUAD', sub: '5 vs 5', desc: '전략과 팀워크로 승리를 쟁취', icon: '▲', color: '#f59e0b', players: '7,100', }, ]; const tierColor: Record = { GRANDMASTER: '#fbbf24', MASTER: '#a855f7', DIAMOND: '#60a5fa', }; return (
{/* Back Banner */}
← 홈페이지 제작 서비스로 돌아가기 | SAMPLE · 게임 매칭 시스템
{/* Navbar */} {/* Hero */}
{/* Grid */}
{/* Scan line */}
{/* Corner decorations */} {[ { top: 40, left: 40, borderTop: '2px solid #06b6d4', borderLeft: '2px solid #06b6d4' }, { top: 40, right: 40, borderTop: '2px solid #a855f7', borderRight: '2px solid #a855f7' }, { bottom: 40, left: 40, borderBottom: '2px solid #06b6d4', borderLeft: '2px solid #06b6d4' }, { bottom: 40, right: 40, borderBottom: '2px solid #a855f7', borderRight: '2px solid #a855f7' }, ].map((s, i) => (
))}
Season 7 · RANKED MATCH

NEXUS
ARENA

ENTER THE ARENA. CLAIM YOUR GLORY.

{/* Live Stats */}
{[ { label: 'ONLINE', val: onlinePlayers.toLocaleString(), color: '#06b6d4' }, { label: 'IN MATCH', val: matchingCount.toLocaleString(), color: '#a855f7' }, { label: 'SERVERS', val: '24', color: '#10b981' }, ].map((s) => (
{s.val}
{s.label}
))}
{/* Matching Button */} {!matchingActive ? ( ) : (
MATCHING... {String(Math.floor(matchTimer / 60)).padStart(2, '0')}:{String(matchTimer % 60).padStart(2, '0')}
)}
{/* Game Modes */}

GAME MODES

{modes.map((mode) => (
{mode.icon}
{mode.name}
{mode.sub}
{mode.desc}
{mode.players} IN QUEUE
))}
{/* Rankings */}

GLOBAL RANKING.

Season 7 · Top 100
{/* Header */}
{['RANK', 'PLAYER', 'SCORE', 'WINS', 'K/D/A'].map((h) => (
{h}
))}
{rankings.map((r, i) => (
{r.rank < 10 ? `0${r.rank}` : r.rank}
{r.name}
{r.tier}
{r.score.toLocaleString()}
{r.wins}
{r.kda}
))}
{/* Footer */}
); }