From 7d4f320a4b2e77bedd9fe18448f962824cf26412 Mon Sep 17 00:00:00 2001 From: jun-0411 Date: Thu, 28 May 2026 18:13:09 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=E2=9C=A8=20Implement=20useLayoutStore=20to?= =?UTF-8?q?=20=20check=20subheader=20mount=20state?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useLayoutStore.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/hooks/useLayoutStore.ts diff --git a/src/hooks/useLayoutStore.ts b/src/hooks/useLayoutStore.ts new file mode 100644 index 0000000..05c2d29 --- /dev/null +++ b/src/hooks/useLayoutStore.ts @@ -0,0 +1,13 @@ +import { create } from 'zustand'; + +interface LayoutState { + isSubheaderActive: boolean; + setSubheaderActive: (active: boolean) => void; +} + +const useLayoutStore = create((set) => ({ + isSubheaderActive: false, + setSubheaderActive: (active) => set({ isSubheaderActive: active }), +})); + +export default useLayoutStore; From 68769574de240e632276a45fb70da1b50447e57f Mon Sep 17 00:00:00 2001 From: jun-0411 Date: Thu, 28 May 2026 18:13:35 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=E2=9C=A8=20Store=20subheader=20mount=20sta?= =?UTF-8?q?te?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Subheader.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/Subheader.tsx b/src/components/Subheader.tsx index 046ea07..f75175f 100644 --- a/src/components/Subheader.tsx +++ b/src/components/Subheader.tsx @@ -16,7 +16,9 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; +import useLayoutStore from '@/hooks/useLayoutStore'; import { ChevronLeftIcon, EllipsisVertical } from 'lucide-react'; +import { useEffect } from 'react'; type DropdownOptions = { onEditClick: () => void; @@ -32,6 +34,15 @@ export default function Subheader({ onBackClick: () => void; dropdownOptions?: DropdownOptions; }) { + const setSubheaderActive = useLayoutStore( + (state) => state.setSubheaderActive + ); + + useEffect(() => { + setSubheaderActive(true); + return () => setSubheaderActive(false); + }, [setSubheaderActive]); + return (
From b4f87a61d451589127b32639e7213d0651336052 Mon Sep 17 00:00:00 2001 From: jun-0411 Date: Thu, 28 May 2026 18:14:14 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=92=84=20Hide=20global=20header=20whe?= =?UTF-8?q?n=20subheader=20mount=20&=20mobile(less=20than=20md)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Header.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 1a70c4e..446632e 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -2,12 +2,14 @@ import ProfileButton from '@/components/ProfileButton'; import { Button } from '@/components/ui/button'; import useAuth from '@/hooks/useAuth'; import useAuthStore from '@/hooks/useAuthStore'; +import useLayoutStore from '@/hooks/useLayoutStore'; import { useEffect } from 'react'; import { Link, useLocation } from 'react-router'; export default function Header() { const { user, handleLogout, refreshUser } = useAuth(); const isLoggedIn = useAuthStore((state) => state.isLoggedIn); + const isSubheaderActive = useLayoutStore((state) => state.isSubheaderActive); const setRedirectUrl = useAuthStore((state) => state.setRedirectUrl); const location = useLocation(); @@ -37,7 +39,9 @@ export default function Header() { }, [isLoggedIn, refreshUser]); return ( -
+
Date: Sat, 30 May 2026 16:45:29 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=92=AC=20Update=20subheader=20titles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/EventMain.tsx | 2 +- src/routes/EventRegister.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/EventMain.tsx b/src/routes/EventMain.tsx index 2ac11b4..32ee94c 100644 --- a/src/routes/EventMain.tsx +++ b/src/routes/EventMain.tsx @@ -160,7 +160,7 @@ export default function EventMain() { {/* 1. 상단 네비게이션 */} {view === 'ADMIN' && ( navigate('/')} dropdownOptions={{ onEditClick: () => navigate('edit'), diff --git a/src/routes/EventRegister.tsx b/src/routes/EventRegister.tsx index 84650fc..6dd1421 100644 --- a/src/routes/EventRegister.tsx +++ b/src/routes/EventRegister.tsx @@ -79,7 +79,7 @@ export default function EventRegister() { return (
{/* 1. 상단 네비게이션 */} - navigate(-1)} /> + navigate(-1)} /> {/* 2. 메인 콘텐츠 */}
From 17fe6eea0834aa24ca281d00164fd5a37d0cf0b4 Mon Sep 17 00:00:00 2001 From: jun-0411 Date: Sat, 6 Jun 2026 15:46:58 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=E2=9C=A8=20Show=20subheader=20only=20event?= =?UTF-8?q?card=20access=20or=20host?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EventCard.tsx | 4 ++-- src/routes/EventMain.tsx | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/EventCard.tsx b/src/components/EventCard.tsx index d0995e6..686529a 100644 --- a/src/components/EventCard.tsx +++ b/src/components/EventCard.tsx @@ -121,7 +121,7 @@ export default function EventCard({ key={`card-${publicId}`} className="w-full rounded-lg border border-border" > - +

{title}

@@ -151,7 +151,7 @@ export default function EventCard({
- +
diff --git a/src/routes/EventMain.tsx b/src/routes/EventMain.tsx index 32ee94c..13c5ef3 100644 --- a/src/routes/EventMain.tsx +++ b/src/routes/EventMain.tsx @@ -9,7 +9,7 @@ import { X, } from 'lucide-react'; import { type ComponentProps, useEffect, useState } from 'react'; -import { useNavigate, useParams } from 'react-router'; +import { useLocation, useNavigate, useParams } from 'react-router'; import { toast } from 'sonner'; // Hooks @@ -44,7 +44,9 @@ import { formatEventDate, getRemainingTime } from '@/utils/date'; export default function EventMain() { const { id } = useParams<{ id: string }>(); const navigate = useNavigate(); + const location = useLocation(); const queryClient = useQueryClient(); + const fromHome = location.state?.fromHome; const { user, isLoggedIn } = useAuth(); const { removeGuestRegistration } = useAuthStore(); @@ -158,14 +160,18 @@ export default function EventMain() { return (
{/* 1. 상단 네비게이션 */} - {view === 'ADMIN' && ( + {(fromHome || view === 'ADMIN') && ( navigate('/')} - dropdownOptions={{ - onEditClick: () => navigate('edit'), - onDeleteClick: onDeleteClick, - }} + dropdownOptions={ + view === 'ADMIN' + ? { + onEditClick: () => navigate('edit'), + onDeleteClick: onDeleteClick, + } + : undefined + } /> )} From 1e4a33a4516f2376eb4f4503dd6e18511672f360 Mon Sep 17 00:00:00 2001 From: jun-0411 Date: Sat, 6 Jun 2026 15:48:11 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=92=84=20Unify=20mobile/web=20standar?= =?UTF-8?q?d=20to=20md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ProfileButton.tsx | 4 ++-- src/components/SimpleDateTimePicker.tsx | 24 ++++++++++++------------ src/components/ui/alert-dialog.tsx | 4 ++-- src/routes/Guests.tsx | 12 ++++++------ 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/components/ProfileButton.tsx b/src/components/ProfileButton.tsx index 83f339c..35ae306 100644 --- a/src/components/ProfileButton.tsx +++ b/src/components/ProfileButton.tsx @@ -33,8 +33,8 @@ export default function ProfileButton({ diff --git a/src/components/SimpleDateTimePicker.tsx b/src/components/SimpleDateTimePicker.tsx index 59d7fb1..9ca20db 100644 --- a/src/components/SimpleDateTimePicker.tsx +++ b/src/components/SimpleDateTimePicker.tsx @@ -70,15 +70,15 @@ export default function SimpleDateTimePicker(props: SimpleDateTimePickerProps) { -
+
-
- -
+
+ +
{hours.reverse().map((hour) => ( ))}
- +
- -
+ +
{Array.from({ length: 12 }, (_, i) => i * 5).map((minute) => ( ))}
- +
-
+
{['AM', 'PM'].map((ampm) => (