Skip to content

Commit 57137e4

Browse files
committed
fix(front): 컴포넌트 header 수정 완료 alert 삭제
1 parent f3a1594 commit 57137e4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

front/src/components/Header.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ export default function Header() {
1717

1818
const guardNav = (path: string, featureName: string) => () => {
1919
if (!isLoggedIn) {
20-
alert(`${featureName}아직 개발중!`)
20+
alert(`${featureName}로그인이 필요합니다!`)
2121
return
2222
}
2323
router.push(path)
2424
}
2525

26+
const handleCommunityClick = () => {
27+
router.push("/community")
28+
}
29+
2630
return (
2731
<nav className="border-b border-gray-200 bg-background/80 backdrop-blur-xl">
2832
{/* ✅ 가로폭 전체 사용 */}
@@ -46,7 +50,7 @@ export default function Header() {
4650
<button onClick={guardNav("/history", "히스토리")} className="text-sm text-muted-foreground hover:text-foreground transition-colors">
4751
히스토리
4852
</button>
49-
<button onClick={guardNav("/community", "커뮤니티")} className="text-sm text-muted-foreground hover:text-foreground transition-colors">
53+
<button onClick={handleCommunityClick} className="text-sm text-muted-foreground hover:text-foreground transition-colors">
5054
커뮤니티
5155
</button>
5256
<Button size="sm" className="bg-primary text-primary-foreground hover:bg-primary/90" onClick={() => router.push("/analysis")}>
@@ -66,7 +70,7 @@ export default function Header() {
6670
</>
6771
) : (
6872
<>
69-
<button onClick={guardNav("/community", "커뮤니티")} className="text-sm text-muted-foreground hover:text-foreground transition-colors">
73+
<button onClick={handleCommunityClick} className="text-sm text-muted-foreground hover:text-foreground transition-colors">
7074
커뮤니티
7175
</button>
7276

0 commit comments

Comments
 (0)