Repository: llddang/todayeat
Pull request #126: Feature/#109 header component
Author: login: arendt9797
Labels: name: ✨ Feature
description: 기능 개발
name: 🎨 Design
description: 마크업 & CSS 스타일링
name: 💌 리뷰 필요
description: 리뷰가 필요한 상태. 리뷰해 주세요!
name: ⚠️ ASAP
description: 급해요! 최대한 빨리 봐주세요
Created: 2025-04-16T03:55:19Z | Merged: 2025-04-16T07:02:37Z

## #️⃣ 연관된 이슈

- close #109 

<br>

## 📝 작업 내용

- 헤더 컴포넌트 구현
  - 3개로 나누어 구현했습니다.
  - 로고만 있는 헤더
  - 뒤로 가기 버튼만 있는 헤더
  - 로고와 프로필 사진이 있는 헤더
    - 로그인 시 마이 페이지로 이동
    - 비로그인 시 로그인 페이지로 이동

<br>

## 🖼 스크린샷


https://github.com/user-attachments/assets/cfa0c699-ee55-4e64-a159-0a3f3a27865f



<br>

## 💬 리뷰 요구사항

> 리뷰 예상 시간 : 5분

### 레이아웃 사용 시 주의할 점
헤더와 GNB 모두 fixed를 사용하기 때문에, 컨텐츠가 레이아웃 아래로 들어가 겹친 상태로 화면에 표시됩니다. 
따라서, 메인 컨텐츠가 처음에도 잘 보이도록 padding을 적용해야 합니다. 
`tailwindcss.config.ts`에 padding layout 설정을 추가했으니 이를 사용하시면 됩니다. 

### 사용 예시
```tsx
// import Header from '@/components/layouts/header';
import GlobalNavigationBar from '@/components/layouts/global-navigation-bar';
import HeaderWithProfile from '@/components/layouts/header-with-profile';

const Layout = ({
  children
}: Readonly<{
  children: React.ReactNode;
}>) => {
  return (
    <>
      <HeaderWithProfile />
      <div className="py-layout">{children}</div>
      <GlobalNavigationBar />
    </>
  );
};

export default Layout;

```
이 예시는 헤더와 GNB 모두 있으므로 `py-layout`을 적용했습니다. 
페이지 레이아웃에 따라 `pt`를 사용할지 `py`를 사용할지 안 사용할지 결정하면 됩니다. 


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **신규 기능**
    - 다양한 크기(소, 중, 대)로 프로필 이미지를 표시할 수 있는 ProfileImage 컴포넌트가 추가되었습니다.
    - 스크롤 상태에 따라 배경이 동적으로 변경되는 HeaderWithProfile 컴포넌트가 새롭게 도입되었습니다. 로그인 상태에 따라 프로필 이미지 또는 기본 이미지를 표시합니다.
    - 스크롤 여부를 감지하는 useDetectIsScrolled 훅이 추가되었습니다.

- **기능 개선**
    - Header 컴포넌트가 클라이언트 컴포넌트로 전환되고, 스크롤 시 배경 스타일이 동적으로 변경되도록 개선되었습니다.
    - HeaderBackButton이 항상 표시되며, 스크롤 상태에 따라 배경 스타일이 변경되고 접근성이 향상된 버튼 디자인이 적용되었습니다.

- **스타일**
    - Tailwind CSS 설정에 새로운 z-index, padding, 배경 이미지 토큰이 추가되어 레이아웃 및 디자인이 향상되었습니다.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Linked issue #109: [Feature] 헤더 컴포넌트
# ✨ Feature

### 1. 어떤 기능인가요?

- 공통 레이아웃에 들어갈 헤더 컴포넌트

<br>

### 2. 작업 상세 내용

- [ ] 헤더 컴포넌트에 디자인 반영

<br>

### 3. 참고할만한 자료 (선택)

![Image](https://github.com/user-attachments/assets/24e14e5f-da66-4908-835e-6d6fbc09b096)

Diff:
diff --git a/public/icons/back_line.svg b/public/icons/back_line.svg
new file mode 100644
index 00000000..0b7a31db
--- /dev/null
+++ b/public/icons/back_line.svg
@@ -0,0 +1,3 @@
+<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M16.6024 20.6483C16.4305 20.4764 16.334 20.2433 16.334 20.0002C16.334 19.7572 16.4305 19.5241 16.6024 19.3521L21.788 14.1666C21.8725 14.079 21.9737 14.0092 22.0855 13.9611C22.1973 13.9131 22.3176 13.8878 22.4393 13.8868C22.5611 13.8857 22.6818 13.9089 22.7944 13.955C22.9071 14.0011 23.0094 14.0691 23.0955 14.1552C23.1816 14.2413 23.2496 14.3436 23.2957 14.4563C23.3418 14.5689 23.365 14.6896 23.3639 14.8114C23.3629 14.9331 23.3376 15.0533 23.2895 15.1652C23.2415 15.277 23.1717 15.3782 23.0841 15.4627L18.5466 20.0002L23.0841 24.5377C23.2511 24.7106 23.3435 24.9422 23.3414 25.1825C23.3393 25.4229 23.2429 25.6528 23.073 25.8227C22.903 25.9927 22.6731 26.0891 22.4327 26.0912C22.1924 26.0933 21.9608 26.0009 21.788 25.8339L16.6024 20.6483Z" fill="#9C9C9C"/>
+</svg>
diff --git a/public/illustrations/default-profile.svg b/public/illustrations/default-profile.svg
new file mode 100644
index 00000000..3d4ca63e
--- /dev/null
+++ b/public/illustrations/default-profile.svg
@@ -0,0 +1,15 @@
+<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_756_6398)">
+<rect width="512" height="512" fill="#CECECE" fill-opacity="0.29"/>
+<path d="M255.998 324.556C154.045 324.556 71.1094 410.329 71.1094 513.722C71.1094 520.632 76.6224 526.222 83.4353 526.222H428.561C435.374 526.222 440.887 520.632 440.887 513.722C440.887 410.329 357.952 324.556 255.998 324.556ZM366.932 212.056C366.932 150.02 317.17 99.5557 255.998 99.5557C194.826 99.5557 145.065 150.02 145.065 212.056C145.065 274.091 194.826 324.556 255.998 324.556C317.17 324.556 366.932 274.091 366.932 212.056Z" fill="url(#paint0_linear_756_6398)"/>
+</g>
+<defs>
+<linearGradient id="paint0_linear_756_6398" x1="255.998" y1="526.222" x2="255.998" y2="213.333" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0.6"/>
+<stop offset="1" stop-color="white"/>
+</linearGradient>
+<clipPath id="clip0_756_6398">
+<rect width="512" height="512" fill="white"/>
+</clipPath>
+</defs>
+</svg>
diff --git a/src/components/commons/profile-image.tsx b/src/components/commons/profile-image.tsx
new file mode 100644
index 00000000..127a0d0c
--- /dev/null
+++ b/src/components/commons/profile-image.tsx
@@ -0,0 +1,32 @@
+import { cva, type VariantProps } from 'class-variance-authority';
+import DEFAULT_PROFILE from '@/../public/illustrations/default-profile.svg';
+import Image from 'next/image';
+
+const profileImageVariants = cva('relative overflow-hidden rounded-full', {
+  variants: {
+    size: {
+      sm: 'w-9 h-9',
+      md: 'w-16 h-16',
+      lg: 'w-[5.625rem] h-[5.625rem]'
+    }
+  },
+  defaultVariants: {
+    size: 'sm'
+  }
+});
+
+type ProfileImageProps = VariantProps<typeof profileImageVariants> & {
+  src: string | null;
+};
+
+const ProfileImage = ({ src, size }: ProfileImageProps) => {
+  const imageUrl = src || DEFAULT_PROFILE;
+
+  return (
+    <div className={profileImageVariants({ size })}>
+      <Image src={imageUrl} alt="프로필" fill className="object-cover" />
+    </div>
+  );
+};
+
+export default ProfileImage;
diff --git a/src/components/layouts/header-back-button.tsx b/src/components/layouts/header-back-button.tsx
index 6660e8d7..288b7461 100644
--- a/src/components/layouts/header-back-button.tsx
+++ b/src/components/layouts/header-back-button.tsx
@@ -1,20 +1,26 @@
 'use client';
 
-import { useRouter, useSearchParams } from 'next/navigation';
+import { cn } from '@/lib/utils';
+import { useDetectIsScrolled } from '@/lib/hooks/use-detect-is-scrolled';
+import { useRouter } from 'next/navigation';
 
 const HeaderBackButton = () => {
+  const isScrolled = useDetectIsScrolled();
   const router = useRouter();
-  const params = useSearchParams();
-
-  const step = params.get('step') ?? '';
-  const canGoBack = step.includes('step');
-
-  if (!canGoBack) return null;
 
   return (
-    <button onClick={() => router.back()} className="absolute left-4 mr-2">
-      ← Back
-    </button>
+    <header
+      className={cn(
+        'z-layout fixed left-0 top-0 flex h-16 w-full items-center px-4 py-3',
+        isScrolled ? 'bg-purple-10/94 backdrop-blur-[20px]' : 'bg-transparent'
+      )}
+    >
+      <button
+        onClick={() => router.back()}
+        aria-label="뒤로가기"
+        className="h-10 w-10 bg-back-line-icon bg-contain bg-center bg-no-repeat"
+      />
+    </header>
   );
 };
 
diff --git a/src/components/layouts/header-with-profile.tsx b/src/components/layouts/header-with-profile.tsx
new file mode 100644
index 00000000..d8ee2a17
--- /dev/null
+++ b/src/components/layouts/header-with-profile.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import Link from 'next/link';
+import Image from 'next/image';
+import { cn } from '@/lib/utils';
+import { useDetectIsScrolled } from '@/lib/hooks/use-detect-is-scrolled';
+import ProfileImage from '@/components/commons/profile-image';
+import SITE_MAP from '@/constants/site-map.constant';
+import LOGO from '@/../public/logo.svg';
+import { useUserStore } from '@/lib/hooks/use-user-store';
+
+const HeaderWithProfile = () => {
+  const { user } = useUserStore();
+  const isScrolled = useDetectIsScrolled();
+
+  return (
+    <header
+      className={cn(
+        'fixed left-0 top-0 z-layout flex h-16 w-full items-center justify-between px-4 py-3',
+        isScrolled ? 'bg-purple-10/94 backdrop-blur-[20px]' : 'bg-transparent'
+      )}
+    >
+      <Image src={LOGO} alt="투데잇 로고" />
+      {user.id ? (
+        <Link href={SITE_MAP.MY_PAGE}>
+          <ProfileImage src={user.profileImage} size="sm" />
+        </Link>
+      ) : (
+        <Link href={SITE_MAP.SIGN_IN}>
+          <ProfileImage src={null} size="sm" />
+        </Link>
+      )}
+    </header>
+  );
+};
+
+export default HeaderWithProfile;
diff --git a/src/components/layouts/header.tsx b/src/components/layouts/header.tsx
index 80ab0db7..5690c10f 100644
--- a/src/components/layouts/header.tsx
+++ b/src/components/layouts/header.tsx
@@ -1,17 +1,21 @@
-import Link from 'next/link';
-import BackButton from './header-back-button';
-import SITE_MAP from '@/constants/site-map.constant';
-import { Suspense } from 'react';
+'use client';
+
+import Image from 'next/image';
+import { cn } from '@/lib/utils';
+import { useDetectIsScrolled } from '@/lib/hooks/use-detect-is-scrolled';
+import LOGO from '@/../public/logo.svg';
+
+const Header = () => {
+  const isScrolled = useDetectIsScrolled();
 
-const Header = async () => {
   return (
-    <header className="relative flex justify-center bg-yellow-100 p-4">
-      <Suspense>
-        <BackButton />
-      </Suspense>
-      <Link href={SITE_MAP.HOME} className="text-lg font-bold">
-        투데잇
-      </Link>
+    <header
+      className={cn(
+        'z-layout fixed left-0 top-0 flex h-16 w-full items-center px-4 py-3',
+        isScrolled ? 'bg-purple-10/94 backdrop-blur-[20px]' : 'bg-transparent'
+      )}
+    >
+      <Image src={LOGO} alt="투데잇 로고" />
     </header>
   );
 };
diff --git a/src/lib/hooks/use-detect-is-scrolled.ts b/src/lib/hooks/use-detect-is-scrolled.ts
new file mode 100644
index 00000000..a2d19ced
--- /dev/null
+++ b/src/lib/hooks/use-detect-is-scrolled.ts
@@ -0,0 +1,13 @@
+import { useEffect, useState } from 'react';
+
+export const useDetectIsScrolled = () => {
+  const [isScrolled, setIsScrolled] = useState(false);
+
+  useEffect(() => {
+    const handleScroll = () => setIsScrolled(window.scrollY > 0);
+    window.addEventListener('scroll', handleScroll);
+    return () => window.removeEventListener('scroll', handleScroll);
+  }, []);
+
+  return isScrolled;
+};
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 3d68ecb7..5f347455 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -139,7 +139,11 @@ const config: Config = {
         sm: 'calc(var(--radius) - 4px)'
       },
       zIndex: {
-        background: '-10'
+        background: '-10',
+        layout: '10'
+      },
+      padding: {
+        layout: '4rem'
       },
       backgroundImage: {
         'info-icon': "url('/icons/information_line.svg')",
@@ -167,7 +171,9 @@ const config: Config = {
         'chart-line-icon': 'url(/icons/chart_line.svg)',
         'kakao-logo': 'url(/kakao-logo.svg)',
         'google-logo': 'url(/google-logo.svg)',
-        'complete-confetti': 'url(/illustrations/complete-confetti.svg)'
+        'complete-confetti': 'url(/illustrations/complete-confetti.svg)',
+        'default-profile': 'url(/illustrations/default_profile.svg)',
+        'back-line-icon': 'url(/icons/back_line.svg)'
       },
       letterSpacing: {
         snug: '-0.0175rem'


Reviews:
user: login: jiyxxn
body: 확인했습니다! 프로필 이미지 변경만 부탁드려요!
state: CHANGES_REQUESTED
author_association: COLLABORATOR
submitted_at: 2025-04-16T04:01:39Z
user: login: llddang
body: 고생하셨습니다!

`HeaderWithProfile`에서 로직 수정해주시면 될 것 같아요!
state: APPROVED
author_association: OWNER
submitted_at: 2025-04-16T04:02:07Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>src/components/layouts/header-with-profile.tsx (1)</summary><blockquote>

`24-32`: **선택적 체이닝(optional chaining) 사용을 권장합니다.**

현재 조건문에서 더 간결한 선택적 체이닝을 사용할 수 있습니다.

아래와 같이 변경하는 것이 좋겠습니다:

```diff
-      {user && user.profileImage ? (
+      {user?.profileImage ? (
        <Link href={SITE_MAP.MY_PAGE}>
          <ProfileImage src={user.profileImage} size="sm" />
        </Link>
      ) : (
        <Link href={SITE_MAP.SIGN_IN}>
          <ProfileImage size="sm" />
        </Link>
      )}
```

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Biome (1.9.4)</summary>

[error] 24-25: Change to an optional chain.

Unsafe fix: Change to an optional chain.


(lint/complexity/useOptionalChain)

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 2c52425ed855a21c323d21a430ba8753913e9124 and 9d6be34f92691b32428037a0be6e3a121ed3a18f.

</details>

<details>
<summary>⛔ Files ignored due to path filters (2)</summary>

* `public/icons/back_line.svg` is excluded by `!**/*.svg`
* `public/illustrations/default_profile.svg` is excluded by `!**/*.svg`

</details>

<details>
<summary>📒 Files selected for processing (6)</summary>

* `src/components/commons/profile-image.tsx` (1 hunks)
* `src/components/layouts/header-back-button.tsx` (1 hunks)
* `src/components/layouts/header-with-profile.tsx` (1 hunks)
* `src/components/layouts/header.tsx` (1 hunks)
* `src/lib/hooks/use-detect-scroll.ts` (1 hunks)
* `tailwind.config.ts` (2 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code Graph Analysis (3)</summary>

<details>
<summary>src/components/layouts/header-with-profile.tsx (3)</summary><blockquote>

<details>
<summary>src/lib/hooks/use-user-store.ts (1)</summary>

* `useUserStore` (4-17)

</details>
<details>
<summary>src/lib/hooks/use-detect-scroll.ts (1)</summary>

* `useDetectScroll` (3-13)

</details>
<details>
<summary>src/lib/utils.ts (1)</summary>

* `cn` (4-6)

</details>

</blockquote></details>
<details>
<summary>src/components/layouts/header-back-button.tsx (2)</summary><blockquote>

<details>
<summary>src/lib/hooks/use-detect-scroll.ts (1)</summary>

* `useDetectScroll` (3-13)

</details>
<details>
<summary>src/lib/utils.ts (1)</summary>

* `cn` (4-6)

</details>

</blockquote></details>
<details>
<summary>src/components/layouts/header.tsx (2)</summary><blockquote>

<details>
<summary>src/lib/hooks/use-detect-scroll.ts (1)</summary>

* `useDetectScroll` (3-13)

</details>
<details>
<summary>src/lib/utils.ts (1)</summary>

* `cn` (4-6)

</details>

</blockquote></details>

</details><details>
<summary>🪛 Biome (1.9.4)</summary>

<details>
<summary>src/components/layouts/header-with-profile.tsx</summary>

[error] 24-25: Change to an optional chain.

Unsafe fix: Change to an optional chain.


(lint/complexity/useOptionalChain)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (17)</summary><blockquote>

<details>
<summary>src/lib/hooks/use-detect-scroll.ts (1)</summary>

`1-13`: **훌륭한 훅 구현입니다!**

스크롤 감지 훅이 잘 구현되어 있습니다. 이벤트 리스너를 적절하게 추가하고 정리하는 로직이 포함되어 있어 메모리 누수를 방지합니다. 단일 책임 원칙을 잘 따르고 있으며, 간결하게 구현되었습니다.

</details>
<details>
<summary>tailwind.config.ts (3)</summary>

`141-144`: **z-index 확장이 잘 정의되었습니다.**

레이아웃 요소의 z-index가 추가되어 고정 위치 헤더와 다른 요소들 간의 레이어링을 더 체계적으로 관리할 수 있게 되었습니다.

---

`145-147`: **레이아웃 패딩 설정이 추가되었습니다.**

PR 목표에 맞게 레이아웃 패딩이 추가되었습니다. 이는 고정된 헤더와 GNB 아래에서 콘텐츠가 겹치지 않도록 하는 데 도움이 될 것입니다.

---

`174-176`: **새로운 배경 이미지 리소스가 잘 추가되었습니다.**

새로운 UI 컴포넌트에 필요한 이미지 리소스가 Tailwind 설정에 추가되었습니다. 특히 기본 프로필 이미지와 뒤로 가기 아이콘이 잘 정의되었습니다.

</details>
<details>
<summary>src/components/commons/profile-image.tsx (3)</summary>

`1-16`: **프로필 이미지 변형이 잘 정의되었습니다.**

class-variance-authority를 사용하여 프로필 이미지 크기 변형을 잘 정의했습니다. 세 가지 크기 옵션(sm, md, lg)을 제공하고 기본값을 'sm'으로 설정한 것이 좋습니다.

---

`18-21`: **타입 정의가 깔끔합니다.**

`VariantProps`를 활용하여 컴포넌트 속성 타입을 정의한 것이 좋습니다. 선택적 `src` 속성을 추가하여 이미지 URL을 유연하게 처리할 수 있습니다.

---

`22-30`: **프로필 이미지 컴포넌트 구현이 잘 되었습니다.**

기본 이미지 대체 로직이 잘 구현되었고, Next.js의 Image 컴포넌트를 사용하여 최적화된 이미지 렌더링을 제공합니다. `fill`과 `object-cover`를 사용하여 이미지 비율을 유지하면서 컨테이너를 채우는 방식이 좋습니다.

</details>
<details>
<summary>src/components/layouts/header-back-button.tsx (4)</summary>

`3-5`: **불필요한 임포트를 제거하고 필요한 유틸리티를 추가했습니다.**

URL 검색 매개변수 유틸리티를 제거하고 `cn` 유틸리티와 `useDetectScroll` 훅을 추가한 것이 좋습니다. 이를 통해 코드가 더 깔끔해지고 새로운 스크롤 감지 기능을 활용할 수 있게 되었습니다.

---

`8-9`: **스크롤 감지 훅을 잘 활용했습니다.**

새로 만든 `useDetectScroll` 훅을 사용하여 스크롤 상태에 따라 헤더 스타일을 동적으로 변경하는 로직이 잘 구현되었습니다.

---

`12-17`: **헤더의 스타일링과 위치 지정이 개선되었습니다.**

`cn` 유틸리티를 사용하여 조건부 클래스 이름을 적용하는 방식이 잘 구현되었습니다. 스크롤 여부에 따라 배경 스타일이 달라지고, z-index와 고정 위치가 적절하게 설정되어 있습니다. 특히 스크롤 시 blur 효과와 배경색 변경이 UI 경험을 향상시킵니다.

---

`18-22`: **백 버튼의 접근성과 스타일링이 개선되었습니다.**

뒤로 가기 버튼에 `aria-label`을 추가하여 접근성을 개선했고, 백그라운드 이미지를 사용하여 일관된 스타일링을 적용했습니다. 버튼 크기도 적절하게 설정되어 있습니다.

</details>
<details>
<summary>src/components/layouts/header-with-profile.tsx (3)</summary>

`1-11`: **의존성 및 가져오기 정리가 잘 되어 있습니다.**

필요한 모든 컴포넌트와 유틸리티가 깔끔하게 가져와졌습니다. 클라이언트 사이드 컴포넌트 지시문도 올바르게 추가되었습니다.

---

`12-15`: **훅 사용이 적절합니다.**

`useUserStore`와 `useDetectScroll` 훅을 통해 사용자 정보와 스크롤 상태를 효율적으로 관리하고 있습니다.

---

`16-23`: **스크롤에 따른 헤더 스타일 변경 로직이 잘 구현되었습니다.**

스크롤 상태에 따라 배경을 변경하는 조건부 클래스 적용이 `cn` 유틸리티를 사용하여 깔끔하게 처리되었습니다. 고정 위치 지정과 z-index 설정도 적절합니다.

</details>
<details>
<summary>src/components/layouts/header.tsx (3)</summary>

`1-6`: **클라이언트 컴포넌트와 의존성 가져오기가 잘 구현되었습니다.**

클라이언트 사이드 렌더링을 위한 지시문과 필요한 모듈들이 깔끔하게 가져와졌습니다.

---

`8-10`: **스크롤 감지 훅 사용이 적절합니다.**

`useDetectScroll` 훅을 사용하여 페이지 스크롤 상태를 추적하는 방식이 효율적입니다.

---

`11-19`: **헤더 컴포넌트 구현이 깔끔합니다.**

헤더의 고정 위치 지정과 스크롤에 따른 조건부 스타일 적용이 잘 구현되었습니다. `z-layout` 클래스를 통한 레이어 관리와 블러 효과 적용도 적절합니다.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-16T04:03:13Z
user: login: woohyuckk
body: 고생하셨습니다!
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-04-16T05:54:33Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>src/lib/hooks/use-detect-is-scrolled.ts (2)</summary><blockquote>

`6-10`: **스크롤 이벤트 쓰로틀링을 고려해보세요.**

스크롤 이벤트는 매우 빈번하게 발생할 수 있어 성능에 영향을 줄 수 있습니다. 특히 복잡한 렌더링을 유발할 경우 더욱 그렇습니다. 스크롤 이벤트에 쓰로틀링이나 디바운싱을 적용하면 성능을 향상시킬 수 있습니다.

```diff
useEffect(() => {
-  const handleScroll = () => setIsScrolled(window.scrollY > 0);
+  const handleScroll = () => {
+    setIsScrolled(window.scrollY > 0);
+  };
+  
+  // 쓰로틀링된 이벤트 핸들러
+  const throttledHandleScroll = () => {
+    let isThrottled = false;
+    return () => {
+      if (!isThrottled) {
+        handleScroll();
+        isThrottled = true;
+        setTimeout(() => {
+          isThrottled = false;
+        }, 100); // 100ms마다 실행
+      }
+    };
+  };
+  
-  window.addEventListener('scroll', handleScroll);
-  return () => window.removeEventListener('scroll', handleScroll);
+  const throttled = throttledHandleScroll();
+  window.addEventListener('scroll', throttled);
+  return () => window.removeEventListener('scroll', throttled);
}, []);
```

---

`3-3`: **명시적인 반환 타입을 추가해보세요.**

타입스크립트에서는 함수의 반환 타입을 명시적으로 선언하는 것이 좋은 관행입니다. 이는 코드의 가독성과 유지보수성을 높여줍니다.

```diff
-export const useDetectIsScrolled = () => {
+export const useDetectIsScrolled = (): boolean => {
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 9d6be34f92691b32428037a0be6e3a121ed3a18f and 1a8c743fcae083e361715aa68630fc54ec2b3e96.

</details>

<details>
<summary>⛔ Files ignored due to path filters (1)</summary>

* `public/illustrations/illust_profile.svg` is excluded by `!**/*.svg`

</details>

<details>
<summary>📒 Files selected for processing (5)</summary>

* `src/components/commons/profile-image.tsx` (1 hunks)
* `src/components/layouts/header-back-button.tsx` (1 hunks)
* `src/components/layouts/header-with-profile.tsx` (1 hunks)
* `src/components/layouts/header.tsx` (1 hunks)
* `src/lib/hooks/use-detect-is-scrolled.ts` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (4)</summary>

* src/components/commons/profile-image.tsx
* src/components/layouts/header-with-profile.tsx
* src/components/layouts/header-back-button.tsx
* src/components/layouts/header.tsx

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>src/lib/hooks/use-detect-is-scrolled.ts (1)</summary>

`3-13`: **스크롤 감지 훅 구현이 잘 되었습니다.**

스크롤 상태를 감지하는 훅의 구현이 깔끔하고 React 훅 패턴을 잘 따르고 있습니다. 이벤트 리스너의 설정과 정리도 적절히 처리되었습니다.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-16T06:45:22Z
user: login: jiyxxn
body: 확인 완료입니다 우경님 고생하셨습니다!
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-04-16T06:48:45Z

Review comments:
diff_hunk: @@ -0,0 +1,37 @@
+'use client';
+
+import Link from 'next/link';
+import Image from 'next/image';
+import { cn } from '@/lib/utils';
+import { useDetectScroll } from '@/lib/hooks/use-detect-scroll';
+import ProfileImage from '@/components/commons/profile-image';
+import SITE_MAP from '@/constants/site-map.constant';
+import LOGO from '@/../public/logo.svg';
+import { useUserStore } from '@/lib/hooks/use-user-store';
+
+const HeaderWithProfile = () => {
+  const { user } = useUserStore();
+  const isScrolled = useDetectScroll();
+
+  return (
+    <header
+      className={cn(
+        'z-layout fixed left-0 top-0 flex h-16 w-full items-center justify-between px-4 py-3',
+        isScrolled ? 'bg-purple-10/94 backdrop-blur-[20px]' : 'bg-transparent'
+      )}
+    >
+      <Image src={LOGO} alt="투데잇 로고" />
+      {user && user.profileImage ? (
+        <Link href={SITE_MAP.MY_PAGE}>
+          <ProfileImage src={user.profileImage} size="sm" />
+        </Link>
+      ) : (
+        <Link href={SITE_MAP.SIGN_IN}>
+          <ProfileImage size="sm" />
+        </Link>
+      )}
path: src/components/layouts/header-with-profile.tsx
user: login: llddang
body: 저희 프로젝트에서 profileImage가 null 일 가능성이 있습니다.
로그인했지만 profileImage가 없는 사용자에게는 로그인 페이지로 넘어가도록 설정될 것 같습니다!
created_at: 2025-04-16T03:59:18Z
author_association: OWNER
path: public/illustrations/default_profile.svg
user: login: jiyxxn
body: 우경님 일러스트의 경우 하율님께서 모아주신 원본 일러스트로 사용하기로 해서요!

![image](https://github.com/user-attachments/assets/7046350d-7850-4f4f-bc3e-b1ed25ad7fa3)

해당 파일로 변경 부탁드립니다! 저도 같은 파일을 같은 파일명으로 사용하고 있어서 (마이페이지)
동일하게 반영돼야 할 것 같아요!
created_at: 2025-04-16T03:59:51Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,13 @@
+import { useEffect, useState } from 'react';
+
+export const useDetectScroll = () => {
+  const [isScrolled, setIsScrolled] = useState(false);
+
+  useEffect(() => {
+    const handleScroll = () => setIsScrolled(window.scrollY > 0);
+    window.addEventListener('scroll', handleScroll);
+    return () => window.removeEventListener('scroll', handleScroll);
+  }, []);
+
+  return isScrolled;
+};
path: src/lib/hooks/use-detect-scroll.ts
user: login: llddang
body: 스크롤의 위치를 탐지하기 보다 스크롤이  되었는지 감지하는 것 같습니다.
그렇다면 네이밍을 `useDetectScrolled` / `useDetectIsScrolled` 라고 하는 것은 어떨까요?
created_at: 2025-04-16T04:01:08Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,13 @@
+import { useEffect, useState } from 'react';
+
+export const useDetectIsScrolled = () => {
+  const [isScrolled, setIsScrolled] = useState(false);
+
+  useEffect(() => {
+    const handleScroll = () => setIsScrolled(window.scrollY > 0);
+    window.addEventListener('scroll', handleScroll);
+    return () => window.removeEventListener('scroll', handleScroll);
+  }, []);
+
+  return isScrolled;
+};
path: src/lib/hooks/use-detect-is-scrolled.ts
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**SSR 호환성을 위한 window 객체 체크가 필요합니다.**

현재 코드는 항상 `window` 객체가 존재한다고 가정하고 있습니다. 서버 사이드 렌더링(SSR) 환경에서는 `window`가 정의되지 않아 오류가 발생할 수 있습니다. 따라서 `window` 객체의 존재 여부를 확인하는 로직을 추가하는 것이 좋습니다.

```diff
export const useDetectIsScrolled = () => {
  const [isScrolled, setIsScrolled] = useState(false);

  useEffect(() => {
+    // 서버 사이드 렌더링 환경에서는 window 객체가 존재하지 않음
+    if (typeof window === 'undefined') return;
+    
    const handleScroll = () => setIsScrolled(window.scrollY > 0);
    window.addEventListener('scroll', handleScroll);
    return () => window.removeEventListener('scroll', handleScroll);
  }, []);

  return isScrolled;
};
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
export const useDetectIsScrolled = () => {
  const [isScrolled, setIsScrolled] = useState(false);

  useEffect(() => {
    // 서버 사이드 렌더링 환경에서는 window 객체가 존재하지 않음
    if (typeof window === 'undefined') return;
    
    const handleScroll = () => setIsScrolled(window.scrollY > 0);
    window.addEventListener('scroll', handleScroll);
    return () => window.removeEventListener('scroll', handleScroll);
  }, []);

  return isScrolled;
};
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-16T06:45:21Z
author_association: NONE

PR comments:
user: login: vercel[bot]
created_at: 2025-04-16T03:55:24Z
body: [vc]: #yn9/NDt1DqvKQSAgl+jA2KtfvZa0uRcgehPtGvZepHk=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJqaXdvb2RhLWRldiIsInJvb3REaXJlY3RvcnkiOm51bGwsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiIifSwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL2xsZGRhbmdzLXByb2plY3RzL2ppd29vZGEtZGV2L1NVYWsxNWl4WWhCU3d0c0FQQmIzd0d5cmthcGoiLCJuZXh0Q29tbWl0U3RhdHVzIjoiSUdOT1JFRCIsInByZXZpZXdVcmwiOiJqaXdvb2RhLWRldi1naXQtZmVhdHVyZS0xMDktaGVhZGVyLWNvbXBvbmVudC1sbGRkYW5ncy1wcm9qZWN0cy52ZXJjZWwuYXBwIn1dfQ==
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)


<details><summary>1 Skipped Deployment</summary>

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **jiwooda-dev** | ⬜️ Ignored ([Inspect](https://vercel.com/llddangs-projects/jiwooda-dev/SUak15ixYhBSwtsAPBb3wGyrkapj)) | [Visit Preview](https://jiwooda-dev-git-feature-109-header-component-llddangs-projects.vercel.app) |  | Apr 16, 2025 6:47am |
</details>


author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-04-16T03:55:26Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

"""
## Walkthrough

이번 변경사항에서는 헤더 영역 관련 컴포넌트의 리팩토링과 신규 도입이 이루어졌습니다. 기존 서버 컴포넌트였던 `Header`가 클라이언트 컴포넌트로 전환되고, 스크롤 상태에 따라 배경 스타일이 동적으로 적용되도록 개선되었습니다. 프로필 이미지를 렌더링하는 공통 컴포넌트(`ProfileImage`)와 스크롤 감지 커스텀 훅(`useDetectIsScrolled`)이 새롭게 추가되었습니다. 또한, 헤더에 프로필 이미지를 표시하는 `HeaderWithProfile` 컴포넌트가 도입되었으며, 디자인 및 스타일 관련 Tailwind CSS 설정이 확장되었습니다.

## Changes

| 파일/경로 요약                                                         | 변경 요약                                                                                                 |
|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| src/components/commons/profile-image.tsx                                | 프로필 이미지를 다양한 크기로 렌더링하는 `ProfileImage` 컴포넌트 신규 추가                                 |
| src/components/layouts/header-with-profile.tsx                          | 스크롤 상태에 따라 배경이 변하는 헤더 및 프로필 이미지 표시 컴포넌트 신규 추가                             |
| src/components/layouts/header.tsx                                      | 서버 컴포넌트에서 클라이언트 컴포넌트로 변경, 스크롤 감지 및 동적 배경 적용, 레이아웃 및 네비게이션 변경   |
| src/components/layouts/header-back-button.tsx                          | step 파라미터 조건부 렌더링 제거, 스크롤 상태 기반 배경 스타일 적용, 버튼 스타일 및 접근성 개선             |
| src/lib/hooks/use-detect-is-scrolled.ts                                | 스크롤 여부를 감지하는 커스텀 훅(`useDetectIsScrolled`) 신규 추가                                          |
| tailwind.config.ts                                                     | zIndex, padding, backgroundImage 등 테마 확장(디자인 토큰 추가)                                           |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant HeaderWithProfile
    participant useDetectIsScrolled
    participant useUserStore
    participant ProfileImage

    User->>HeaderWithProfile: 페이지 진입/스크롤
    HeaderWithProfile->>useDetectIsScrolled: 스크롤 상태 감지
    useDetectIsScrolled-->>HeaderWithProfile: isScrolled 반환
    HeaderWithProfile->>useUserStore: 사용자 정보 조회
    useUserStore-->>HeaderWithProfile: user 객체 반환
    HeaderWithProfile->>ProfileImage: 프로필 이미지 렌더링(src, size)
    ProfileImage-->>HeaderWithProfile: 이미지 컴포넌트 반환
```

## Assessment against linked issues

| Objective                                                        | Addressed | Explanation                                      |
|------------------------------------------------------------------|-----------|--------------------------------------------------|
| 헤더 컴포넌트에 디자인 반영 (#109)                                 | ✅        |                                                  |

## Possibly related PRs

- llddang/todayeat#42: 기존 `Header` 컴포넌트의 구조 및 인증 로직 제거, 레이아웃 단순화와 직접적으로 연관된 리팩토링 PR입니다.

## Suggested reviewers

- llddang
- jiyxxn

## Poem

> 🐰  
> 스크롤 따라 헤더가 춤을 추네,  
> 보랏빛 배경에 프로필도 반짝!  
> 새로운 훅과 컴포넌트,  
> 토끼도 감탄하며 깡총깡총.  
> 오늘도 레이아웃은 한층 더 예뻐졌어요!  
>
"""

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 1a8c743fcae083e361715aa68630fc54ec2b3e96 and 7e986298a797f39640c6f65b9b63bd27faaeafb7.

</details>

<details>
<summary>⛔ Files ignored due to path filters (1)</summary>

* `public/illustrations/default-profile.svg` is excluded by `!**/*.svg`

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `src/components/commons/profile-image.tsx` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* src/components/commons/profile-image.tsx

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcABpIcVwvOkgAIgAxEmpsfwB6MwBGAAYATkhYJKU+JmZufHIMXFj0DHoHAWZ1Gno5SGxESnR/WtwcgHZ+9GRbSAxHAU6MgCYANnC0Wlp/RA7kJAcSSEzcyFb4Uui2SvgMInR8ws6SsorcSAAzfD5cAp4KfBExDRhXgoWrlg3dgoZC0STwJT0E4ECKwfybCTOeDUeDlRBccqbADu6lg/AwXnkaEgXnwRHw4UxkBxL3xhPOAjQDAA1rs8AQMPNavjsbjdvhacTSeSavRibx8Pd4NEePAxCkSN84JsJVKZdw5bgFRd/nxERRkeJyigMAwvNglMgMGgJPAiCjjcK5dSCv5GF45cyTmcXir3mqVZrtWD/GJ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amByCybQAGD6HuFiaWY8qyAYBmHuBmEGYEByAEAmYEFoCmAOZGaSHuAED6BWdWagGFnUB8doD8YCaSIQ1oC6K5nCaAA=== -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=llddang/todayeat&utm_content=126):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE