feat(ui): 헤더 로고 및 기본 레이아웃 골격 추가
docs(todo): 헤더 네비 작업 1~2번 완료 표시
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
"use client";
|
||||
// 클라이언트 훅(useState/useEffect)을 사용하여 세션 표시/로그아웃을 처리합니다.
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { ThemeToggle } from "@/app/components/ThemeToggle";
|
||||
import { SearchBar } from "@/app/components/SearchBar";
|
||||
import { Button } from "@/app/components/ui/Button";
|
||||
@@ -20,11 +22,15 @@ export function AppHeader() {
|
||||
location.reload();
|
||||
};
|
||||
return (
|
||||
<header style={{ display: "flex", justifyContent: "space-between", padding: 12 }}>
|
||||
<div>msg App</div>
|
||||
<header style={{ display: "flex", alignItems: "center", justifyContent: "space-between", padding: 12 }}>
|
||||
<div style={{ display: "flex", alignItems: "center", gap: 12 }}>
|
||||
<Link href="/" aria-label="홈">
|
||||
<Image src="/logo.png" alt="logo" width={120} height={28} priority />
|
||||
</Link>
|
||||
</div>
|
||||
<nav style={{ display: "flex", gap: 12, alignItems: "center" }}>
|
||||
<a href="/">홈</a>
|
||||
<a href="/boards">게시판</a>
|
||||
{/* 대분류/소분류 네비는 이후 단계에서 데이터 연동 포함 확장 */}
|
||||
<Link href="/boards">게시판</Link>
|
||||
<SearchBar />
|
||||
<ThemeToggle />
|
||||
{user ? (
|
||||
@@ -33,7 +39,7 @@ export function AppHeader() {
|
||||
<Button variant="ghost" onClick={onLogout}>로그아웃</Button>
|
||||
</div>
|
||||
) : (
|
||||
<a href="/login">로그인</a>
|
||||
<Link href="/login">로그인</Link>
|
||||
)}
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user