feat(fsd): 허브·스페이스 중심 UI 목업 구조로 재편
맥락: - 기존 라우트/컴포넌트 구조를 FSD 기준으로 정리하고, /app 허브와 /space 집중 화면 중심의 목업 흐름을 구성하기 위해 변경사항: - App Router 구조를 /landing, /app, /space, /stats, /settings 중심으로 재배치 - entities/session/room/user 더미 데이터와 타입 정의 추가 - features(커스텀 입장, 룸 선택, 체크인, 리액션, 30초 리스타트 등) 단위로 로직 분리 - widgets(허브, 룸 갤러리, 타이머 HUD, 툴 도크 등) 조합형 UI 추가 - shared 공용 UI(Button/Chip/Modal/Toast 등) 및 유틸(cn/useReducedMotion) 정비 - 로그인 후 이동 경로를 /dashboard 에서 /app 으로 변경 - README를 현재 프로젝트 구조/라우트/구현 범위 기준으로 갱신 검증: - npx tsc --noEmit 세션-상태: 허브·스페이스 목업이 FSD 레이어로 동작 가능하도록 정리됨 세션-다음: /space 상단 및 도크의 인원 수 카피를 분위기형 카피로 후속 정리 세션-리스크: build는 네트워크 환경에서 Google Fonts fetch 실패 가능
This commit is contained in:
62
src/features/room-select/ui/RoomPreviewCard.tsx
Normal file
62
src/features/room-select/ui/RoomPreviewCard.tsx
Normal file
@@ -0,0 +1,62 @@
|
||||
import type { RoomTheme } from '@/entities/room';
|
||||
import { getRoomBackgroundStyle } from '@/entities/room';
|
||||
import { Chip } from '@/shared/ui';
|
||||
import { cn } from '@/shared/lib/cn';
|
||||
|
||||
interface RoomPreviewCardProps {
|
||||
room: RoomTheme;
|
||||
selected: boolean;
|
||||
onSelect: (roomId: string) => void;
|
||||
}
|
||||
|
||||
export const RoomPreviewCard = ({
|
||||
room,
|
||||
selected,
|
||||
onSelect,
|
||||
}: RoomPreviewCardProps) => {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => onSelect(room.id)}
|
||||
className={cn(
|
||||
'group relative overflow-hidden rounded-2xl border p-4 text-left transition-all duration-250 motion-reduce:transition-none',
|
||||
selected
|
||||
? 'border-sky-200/85 shadow-[0_0_0_1px_rgba(186,230,253,0.9)]'
|
||||
: 'border-white/18 hover:border-white/35',
|
||||
)}
|
||||
>
|
||||
<div aria-hidden className="absolute inset-0" style={getRoomBackgroundStyle(room)} />
|
||||
<div aria-hidden className="absolute inset-0 bg-slate-950/54" />
|
||||
<div aria-hidden className="absolute inset-0 bg-[linear-gradient(to_top,rgba(2,6,23,0.86),rgba(2,6,23,0.25))]" />
|
||||
|
||||
<div className="relative space-y-3">
|
||||
<div>
|
||||
<h3 className="text-base font-semibold text-white">{room.name}</h3>
|
||||
<p className="mt-1 text-xs text-white/72">{room.description}</p>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{room.tags.map((tag) => (
|
||||
<Chip key={tag} tone="muted" className="!cursor-default">
|
||||
{tag}
|
||||
</Chip>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<p className="text-xs text-white/76">
|
||||
추천 사운드: <span className="font-medium text-white">{room.recommendedSound}</span>
|
||||
</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<Chip tone="accent" className="!cursor-default">
|
||||
추천 시간 · {room.recommendedTime}
|
||||
</Chip>
|
||||
<Chip tone="neutral" className="!cursor-default">
|
||||
지금 분위기 · {room.vibeLabel}
|
||||
</Chip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user