diff --git a/src/app/user/[userId]/page.tsx b/src/app/user/[userId]/page.tsx index 2952f3e..253af5c 100644 --- a/src/app/user/[userId]/page.tsx +++ b/src/app/user/[userId]/page.tsx @@ -22,18 +22,11 @@ import UserTrack from "@/features/user/user-track"; import UserAlbum from "@/features/user/user-album"; import UserPlaylist from "@/features/user/user-playlist"; import { ChevronDown } from "lucide-react"; -import { useAuth } from "@/provider/authProvider"; -import { useRouter } from "next/navigation"; -import useSigninModal from "@/hooks/modal/use-signin-modal"; export default function UserPage() { const [activeTab, setActiveTab] = useState("track"); const [array, setArray] = useState("new"); - const signinModal = useSigninModal(); - const { isLoggedIn } = useAuth(); - const router = useRouter(); - const tabs = [ { id: "track", label: "트랙", icon: IconMusic, onClick: () => {} }, { id: "album", label: "앨범", icon: IconDisc, onClick: () => {} }, @@ -46,114 +39,101 @@ export default function UserPage() { ]; return ( - <> - {isLoggedIn ? ( -
-
-
-
- - - U - -
-
-
YANG RARO
-
- - -
-
- - - www.instagram.com - -
-
-
-
- Hello! My name is Raro, and im passionate about exploring new - ideas and cultures. I enjoy reading, traveling, and meeting new - people. Currently, im pursuing my interests in technology and - innovation, aiming to make a positive impact in the world. I - believe in lifelong learning and always seek to grow personally - and professionally -
+
+
+
+
+ + + U +
- -
- +
+ Hello! My name is Raro, and im passionate about exploring new ideas + and cultures. I enjoy reading, traveling, and meeting new people. + Currently, im pursuing my interests in technology and innovation, + aiming to make a positive impact in the world. I believe in lifelong + learning and always seek to grow personally and professionally +
+
-
- {activeTab === "track" ? ( - - ) : activeTab === "album" ? ( - - ) : ( - - )} -
-
- ) : ( - () => { - signinModal.onOpen(); - router.push("/"); - } - )} - +
+
+
+ + + {tabs.map((tab) => ( + + + {tab.label} + + ))} + + + + + + + + + + 최신순 + + + 좋아요순 + + + + +
+
+ +
+ {activeTab === "track" ? ( + + ) : activeTab === "album" ? ( + + ) : ( + + )} +
+
); -} +} \ No newline at end of file diff --git a/src/features/main/bar.tsx b/src/features/main/bar.tsx index de83e8d..c52932b 100644 --- a/src/features/main/bar.tsx +++ b/src/features/main/bar.tsx @@ -61,8 +61,9 @@ export function Bar() { onClick: () => { if (!isLoggedIn) { signinModal.onOpen(); + } else { + setUploadOpen(!uploadOpen); } - setUploadOpen(!uploadOpen); }, }, { @@ -73,8 +74,9 @@ export function Bar() { onClick: () => { if (!isLoggedIn) { signinModal.onOpen(); + } else { + notiModal.onOpen(); } - notiModal.onOpen(); }, }, { @@ -85,8 +87,9 @@ export function Bar() { onClick: () => { if (!isLoggedIn) { signinModal.onOpen(); + } else { + router.push("/user/123") } - router.push("/user/123") }, }, @@ -130,4 +133,4 @@ export const useOutsideClick = ( document.removeEventListener("touchstart", listener); }; }, [ref, callback]); -}; +}; \ No newline at end of file