diff --git a/src/assets/Rectangle.png b/src/assets/Rectangle.png new file mode 100644 index 00000000..b645a286 Binary files /dev/null and b/src/assets/Rectangle.png differ diff --git a/src/assets/icons/pencil.svg b/src/assets/icons/pencil.svg new file mode 100644 index 00000000..6ece2544 --- /dev/null +++ b/src/assets/icons/pencil.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icons/play.svg b/src/assets/icons/play.svg new file mode 100644 index 00000000..90e98bce --- /dev/null +++ b/src/assets/icons/play.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/ui/BottomSheet.tsx b/src/components/ui/BottomSheet.tsx index d847c994..11f9f470 100644 --- a/src/components/ui/BottomSheet.tsx +++ b/src/components/ui/BottomSheet.tsx @@ -56,6 +56,8 @@ type BottomSheetContextValue = { onClose: () => void; /** 풀페이지 → 이전 스냅(절반)으로 내리기 */ collapse: () => void; + /** 절반 → 풀페이지로 올리기 */ + expand: () => void; }; const BottomSheetContext = React.createContext(null); @@ -110,14 +112,18 @@ function BottomSheet({ } } - const isFullPage = activeSnap === lastSnap; + const isFullPage = snapPoints.length > 1 && activeSnap === lastSnap; const collapse = React.useCallback(() => { setActiveSnap(firstSnap); }, [firstSnap]); + const expand = React.useCallback(() => { + setActiveSnap(lastSnap); + }, [lastSnap]); + return ( - + +
-

{title}

-

{artist}

+

{pin.title}

+

{pin.artist}

- {likeCount !== undefined ? ( + {pin.likeCount !== undefined ? (
- {likeCount} + {pin.likeCount}
) : null}
-
- {pinCount}명이 등록 +
- + +
); } diff --git a/src/features/pin/components/SongCard.tsx b/src/features/pin/components/SongCard.tsx index f6b886d4..a0ff993d 100644 --- a/src/features/pin/components/SongCard.tsx +++ b/src/features/pin/components/SongCard.tsx @@ -10,9 +10,11 @@ export function SongCard({ song, onClick }: SongCardProps) { + + + + + ); +} + +function FeedVisibilityToggle({ + checked, + onChange, +}: { + checked: boolean; + onChange: (checked: boolean) => void; +}) { + return ( + + ); +} + +export default function SongDetailPage() { + const navigate = useNavigate(); + const { songId } = useParams<{ songId: string }>(); + + const song = MOCK_SONG_CARD_LIST.find((item) => item.id === songId) ?? MOCK_SONG_CARD_LIST[0]; + + const [introduction, setIntroduction] = useState(''); + const [selectedTags, setSelectedTags] = useState([]); + const [isFeedPublic, setIsFeedPublic] = useState(true); + const [isSongSelectOpen, setIsSongSelectOpen] = useState(false); + + const coverUrl = song.artistImage || rectangleBg; + const waveformPeaks = MOCK_WAVEFORM_PEAKS; + + const toggleTag = (tag: string) => { + setSelectedTags((prev) => { + if (prev.includes(tag)) { + return prev.filter((item) => item !== tag); + } + + if (prev.length >= MAX_TAG_COUNT) { + return prev; + } + + return [...prev, tag]; + }); + }; + + return ( +
+
+ + +
+ +
+
+ + +
+ +
+
+ + + +
+ +
+

{song.title}

+

{song.artist}

+
+ + +
+
+
+ +
+

소개

+
+ +