refactor: fsd 구조로 변환

This commit is contained in:
2026-02-13 15:20:35 +09:00
parent bb1a6fbdab
commit d60d4ccd9e
45 changed files with 1283 additions and 1222 deletions

View File

@@ -0,0 +1,49 @@
import { useFlightSession } from '@/features/flight-session/model/useFlightSession';
export function FlightHudWidget() {
const {
voyage,
isPaused,
formattedTime,
timeLeft,
handlePauseToggle,
handleFinish,
} = useFlightSession();
if (!voyage) return null;
return (
<>
<div className="absolute top-8 z-10 text-center">
<span className="rounded-full border border-indigo-500/30 bg-indigo-950/50 px-4 py-1.5 text-xs font-medium uppercase tracking-widest text-indigo-300 shadow-[0_0_15px_rgba(99,102,241,0.3)] backdrop-blur">
{voyage.routeName} · {isPaused ? '일시정지' : '순항 중'}
</span>
</div>
<div
className={`relative z-10 my-12 font-mono text-7xl font-light tracking-tighter tabular-nums drop-shadow-2xl transition-opacity duration-300 md:text-9xl ${isPaused ? 'opacity-50' : 'opacity-100'}`}
>
{formattedTime}
</div>
<div className="relative z-10 mb-24 max-w-2xl px-4 text-center text-xl font-medium leading-relaxed text-slate-200 drop-shadow-md md:text-2xl">
&ldquo;{voyage.missionText}&rdquo;
</div>
<div className="absolute bottom-12 z-10 flex gap-6">
<button
onClick={handlePauseToggle}
className="rounded-full border border-slate-600 bg-slate-900/50 px-8 py-3 text-sm font-bold uppercase tracking-wide text-slate-300 backdrop-blur transition-all hover:border-slate-400 hover:bg-slate-800/80 hover:text-white"
>
{isPaused ? '다시 시작' : '일시정지'}
</button>
<button
onClick={handleFinish}
className="rounded-full bg-slate-100 px-8 py-3 text-sm font-bold uppercase tracking-wide text-slate-900 shadow-lg shadow-white/10 transition-all hover:bg-indigo-500 hover:text-white"
>
{timeLeft === 0 ? '도착 (회고)' : '항해 종료'}
</button>
</div>
</>
);
}