'use client'; import Link from 'next/link'; import { useState, useEffect } from 'react'; const rankings = [ { rank: 1, name: 'ShadowViper_KR', score: 9_842, tier: 'GRANDMASTER', wins: 312, kda: '18.4', change: '+2' }, { rank: 2, name: 'NightFalcon', score: 9_610, tier: 'GRANDMASTER', wins: 289, kda: '15.2', change: '0' }, { rank: 3, name: 'Xenon_X', score: 9_241, tier: 'MASTER', wins: 267, kda: '12.9', change: '+1' }, { rank: 4, name: 'KR_Dominator', score: 8_970, tier: 'MASTER', wins: 251, kda: '11.7', change: '-1' }, { rank: 5, name: 'Pulse_Wave', score: 8_834, tier: 'DIAMOND', wins: 238, kda: '10.3', change: '+3' }, ]; const modes = [ { id: 'solo', name: 'SOLO', sub: '1 vs 1', desc: '순수한 실력으로 맞붙는 1대1 대결', color: '#06b6d4', players: '12,400', season: 'S7' }, { id: 'duo', name: 'DUO', sub: '2 vs 2', desc: '파트너와 함께하는 전략적 팀플레이', color: '#a855f7', players: '28,700', season: 'S7' }, { id: 'squad', name: 'SQUAD', sub: '5 vs 5', desc: '전략과 팀워크로 승리를 쟁취', color: '#f59e0b', players: '7,100', season: 'S7' }, ]; const recentMatches = [ { result: 'WIN', mode: 'DUO', duration: '18:32', kills: 12, deaths: 2, assists: 8, rating: '+32' }, { result: 'WIN', mode: 'SOLO', duration: '22:11', kills: 8, deaths: 1, assists: 4, rating: '+24' }, { result: 'LOSS', mode: 'SQUAD', duration: '31:45', kills: 5, deaths: 5, assists: 12, rating: '-18' }, { result: 'WIN', mode: 'DUO', duration: '15:20', kills: 15, deaths: 3, assists: 6, rating: '+40' }, ]; const champions = [ { name: 'VIPER', role: 'Assassin', color: '#06b6d4', power: 92, winRate: '63%' }, { name: 'KIRA', role: 'Support', color: '#ec4899', power: 78, winRate: '58%' }, { name: 'IRON', role: 'Tank', color: '#94a3b8', power: 85, winRate: '55%' }, { name: 'NOVA', role: 'Mage', color: '#a855f7', power: 88, winRate: '61%' }, ]; const tierColor: Record = { GRANDMASTER: '#fbbf24', MASTER: '#a855f7', DIAMOND: '#60a5fa', }; const tierIcon = (tier: string) => ( ); 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); const [selectedChampion, setSelectedChampion] = useState(0); const [seasonProgress] = useState(67); 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]); return (
{/* Back Banner */}
← 홈페이지 제작 서비스로 돌아가기 | SAMPLE · 게임 매칭 시스템
{/* Navbar */} {/* Hero */}
{/* Grid */}
{/* Scan */}
{/* Floating particles */} {[ { left: '10%', top: '20%', size: 4, delay: '0s', color: '#06b6d4' }, { left: '85%', top: '30%', size: 6, delay: '1s', color: '#a855f7' }, { left: '20%', top: '70%', size: 3, delay: '2s', color: '#06b6d4' }, { left: '75%', top: '65%', size: 5, delay: '0.5s', color: '#f59e0b' }, { left: '50%', top: '15%', size: 3, delay: '1.5s', color: '#a855f7' }, { left: '60%', top: '80%', size: 4, delay: '2.5s', color: '#10b981' }, ].map((p, i) => (
))} {/* Corner brackets */} {[ { 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' }, { label: 'AVG WAIT', val: '< 30s', color: '#f59e0b' }, ].map((s) => (
{s.val}
{s.label}
))}
{/* Match button */} {!matchingActive ? ( ) : (
MATCHING... {String(Math.floor(matchTimer / 60)).padStart(2, '0')}:{String(matchTimer % 60).padStart(2, '0')}
)}
{/* Season Pass */}
SEASON 7 PASS
Lv. 42 / 100
{seasonProgress}% 완료 다음 보상까지 1,840 XP
{['스킨 3개', '이모트 5개', '칭호 2개', '골드 5,000'].map((reward) => (
{reward}
))}
{/* Champion Select */}
// ROSTER

CHAMPIONS.

{champions.map((c, i) => (
setSelectedChampion(i)} // @ts-expect-error CSS variable style={{ '--champ-color': c.color, border: `1px solid ${selectedChampion === i ? c.color : c.color + '25'}`, borderRadius: 6, padding: '22px 18px', background: selectedChampion === i ? c.color + '10' : 'rgba(0,0,0,0.6)', position: 'relative', overflow: 'hidden' }} > {selectedChampion === i && (
SELECTED
)}
{/* Champion SVG silhouette */}
{c.name}
{c.role}
POWER {c.power}
Win Rate: {c.winRate}
))}
{/* Game Modes */}

GAME MODES

{modes.map((mode) => (
{/* Mode icon */}
{mode.id === 'solo' && } {mode.id === 'duo' && <>} {mode.id === 'squad' && <>}
{mode.name}
{mode.sub}
{mode.desc}
{mode.players} IN QUEUE
AVG WAIT: < 30s
))}
{/* Rankings + Recent Matches */}
{/* Rankings */}

GLOBAL RANKING.

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

RECENT MATCHES.

Last 10 games
{recentMatches.map((m, i) => (
{m.result}
{m.mode}
{m.kills} / {m.deaths} / {m.assists} K/D/A
{m.duration}
{m.rating}
RATING
))}
{/* Footer */}
); }