From ba8e8cb64163b618c4900aa7c07e312bcd8fe4a3 Mon Sep 17 00:00:00 2001 From: sscoderati Date: Sun, 5 Nov 2023 13:11:24 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Feat(#104):=20AppBar=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - className Prop 추가 - Logo 클릭 시 메인으로 이동 - 내 스테디 링크 연결 - 내 프로필 Avatar로 바꾸고 드롭다운 메뉴에 마이페이지, 로그아웃 링크 연결 - 종 아이콘 클릭 시 알림 목록 드롭다운 --- src/components/_common/AppBar/index.tsx | 86 +++++++++++++++++++++---- 1 file changed, 73 insertions(+), 13 deletions(-) diff --git a/src/components/_common/AppBar/index.tsx b/src/components/_common/AppBar/index.tsx index 89377378..34280d8e 100644 --- a/src/components/_common/AppBar/index.tsx +++ b/src/components/_common/AppBar/index.tsx @@ -1,29 +1,89 @@ import Image from "next/image"; +import Link from "next/link"; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/components/ui/popover"; +import { ScrollArea } from "@/components/ui/scroll-area"; import LogoImage from "@/images/logo.png"; +import { cn } from "@/lib/utils"; import { BellIcon } from "@radix-ui/react-icons"; +import { Avatar, IconButton, Separator } from "@radix-ui/themes"; +import Dropdown from "@/components/_common/Dropdown"; import LoginModal from "../Modal/LoginModal"; interface AppBarProps { isLogin: boolean; + className?: string; } +const notifications = Array.from({ length: 10 }, (_, i) => `Notification ${i}`); + export const appBarTextStyles = "text-lg font-bold"; -const AppBar = ({ isLogin = false }: AppBarProps) => { +const AppBar = ({ isLogin = false, className }: AppBarProps) => { return ( -
- 스테디 로고 +
+ + 스테디 로고 + {isLogin ? ( -
-
내 스테디
- -
프로필
+
+ +
내 스테디
+ + + + + + + + + +
+

+ 알림 목록 +

+ {notifications.map((content, idx) => ( +
+
{content}
+ +
+ ))} +
+
+
+
+ + ?
} + src={"/images/steadyturtle.png"} + /> +
) : (