From 53a4a483b32960226cd656f79efcda72e912fafc Mon Sep 17 00:00:00 2001 From: Dohyeon Date: Fri, 12 Jun 2026 09:33:31 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=ED=95=84=ED=84=B0=EB=A7=81=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=ED=95=9C=20=EA=B0=80=EA=B2=8C=20=EC=88=98=EB=9D=BD=20?= =?UTF-8?q?=EB=9D=BC=EB=B2=A8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hooks/useAppliedStoresViewModel.ts | 14 ++++++++------ .../home/applied-stores/types/application.ts | 18 ++++-------------- .../home/applied-stores/types/appliedStore.ts | 8 +------- src/shared/ui/home/ApplicationStatusBadge.tsx | 7 ++++++- 4 files changed, 19 insertions(+), 28 deletions(-) diff --git a/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts b/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts index 0825255b..1b295744 100644 --- a/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts +++ b/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts @@ -16,10 +16,10 @@ import { queryKeys } from '@/shared/lib/queryKeys' const PAGE_SIZE = 20 const FILTER_OPTIONS: { key: FilterType; label: string }[] = [ - { key: 'completed', label: '지원 완료' }, - { key: 'viewed', label: '열람' }, - { key: 'not_viewed', label: '미열람' }, - { key: 'cancelled', label: '지원 취소' }, + { key: 'all', label: '전체' }, + { key: 'submitted', label: '제출됨' }, + { key: 'accepted', label: '수락됨' }, + { key: 'cancelled', label: '취소됨' }, ] const STATUS_SECTIONS: { key: ApplicationStatus; label: string }[] = [ @@ -28,12 +28,14 @@ const STATUS_SECTIONS: { key: ApplicationStatus; label: string }[] = [ { key: 'cancelled', label: '취소됨' }, ] -function getCardStatus(status: ApplicationStatus): 'applied' | 'rejected' { +function getCardStatus( + status: ApplicationStatus +): 'applied' | 'accepted' | 'rejected' { + if (status === 'accepted') return 'accepted' return status === 'cancelled' ? 'rejected' : 'applied' } function getFilterLabel(filter: FilterType): string { - if (filter === 'all') return '전체' return FILTER_OPTIONS.find(o => o.key === filter)?.label ?? '전체' } diff --git a/src/features/user/home/applied-stores/types/application.ts b/src/features/user/home/applied-stores/types/application.ts index 1817dddb..6b9b1b59 100644 --- a/src/features/user/home/applied-stores/types/application.ts +++ b/src/features/user/home/applied-stores/types/application.ts @@ -59,14 +59,13 @@ export interface ApplicationListQueryParams { status?: ApplicationApiStatus[] } -// ---- FilterType → API Status 매핑 ---- +// ---- FilterType → API Status 매핑 (mapApiStatusToUiStatus와 동일 기준) ---- export const FILTER_TO_API_STATUS: Record = { all: [], - not_viewed: ['SUBMITTED'], - viewed: ['SHORTLISTED', 'ACCEPTED', 'REJECTED'], - completed: ['ACCEPTED'], - cancelled: ['CANCELLED', 'EXPIRED', 'DELETED'], + submitted: ['SUBMITTED', 'SHORTLISTED'], + accepted: ['ACCEPTED'], + cancelled: ['CANCELLED', 'REJECTED', 'EXPIRED', 'DELETED'], } // ---- 근무 요일 파싱 ---- @@ -131,14 +130,6 @@ function mapApiStatusToUiStatus( return 'submitted' } -function mapApiStatusToFilterType(apiStatus: ApplicationApiStatus): FilterType { - if (apiStatus === 'SUBMITTED') return 'not_viewed' - if (apiStatus === 'SHORTLISTED') return 'viewed' - if (apiStatus === 'ACCEPTED') return 'completed' - if (apiStatus === 'REJECTED') return 'viewed' - return 'cancelled' -} - // ---- DTO → UI Model ---- export function adaptApplicationDto(dto: ApplicationDto): AppliedStoreData { const { postingSchedule, posting, description, status } = dto @@ -146,7 +137,6 @@ export function adaptApplicationDto(dto: ApplicationDto): AppliedStoreData { id: dto.id, storeName: posting.title, status: mapApiStatusToUiStatus(status.value), - filterType: mapApiStatusToFilterType(status.value), applicationDetail: { selectedWeekdays: parseWorkingDays(postingSchedule.workingDays), timeRangeLabel: formatTimeRange( diff --git a/src/features/user/home/applied-stores/types/appliedStore.ts b/src/features/user/home/applied-stores/types/appliedStore.ts index 6f979645..3c5624d9 100644 --- a/src/features/user/home/applied-stores/types/appliedStore.ts +++ b/src/features/user/home/applied-stores/types/appliedStore.ts @@ -1,11 +1,6 @@ export type ApplicationStatus = 'submitted' | 'accepted' | 'cancelled' -export type FilterType = - | 'all' - | 'completed' - | 'viewed' - | 'not_viewed' - | 'cancelled' +export type FilterType = 'all' | ApplicationStatus export const WEEKDAY_LABELS = [ '월', @@ -30,7 +25,6 @@ export interface AppliedStoreData { id: number storeName: string status: ApplicationStatus - filterType: FilterType thumbnailUrl?: string applicationDetail?: AppliedApplicationDetail } diff --git a/src/shared/ui/home/ApplicationStatusBadge.tsx b/src/shared/ui/home/ApplicationStatusBadge.tsx index 665bfef5..5c1cd2fa 100644 --- a/src/shared/ui/home/ApplicationStatusBadge.tsx +++ b/src/shared/ui/home/ApplicationStatusBadge.tsx @@ -1,5 +1,5 @@ interface ApplicationStatusBadgeProps { - status: 'applied' | 'rejected' + status: 'applied' | 'accepted' | 'rejected' className?: string } @@ -9,6 +9,11 @@ const BADGE_STYLE_MAP = { containerClassName: 'bg-white border border-line-1', textClassName: 'text-text-50', }, + accepted: { + label: '합격', + containerClassName: 'bg-main border border-main', + textClassName: 'text-white', + }, rejected: { label: '불합격', containerClassName: 'bg-error border border-error', From b34f6bba6c69c6000afdabc720ae0f8908e46982 Mon Sep 17 00:00:00 2001 From: Dohyeon Date: Fri, 12 Jun 2026 09:40:10 +0900 Subject: [PATCH 2/5] =?UTF-8?q?design:=20UI=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hooks/useAppliedStoresViewModel.ts | 1 + .../applied-stores/ui/AppliedStoreCard.tsx | 7 +- .../applied-stores/ui/AppliedStoreList.tsx | 3 +- .../ui/AppliedStoreListItem.tsx | 7 +- src/pages/notification/index.tsx | 4 +- src/pages/user/applied-stores/index.tsx | 68 +++++++++++-------- src/pages/user/home/index.tsx | 6 +- 7 files changed, 56 insertions(+), 40 deletions(-) diff --git a/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts b/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts index 1b295744..4b5946cf 100644 --- a/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts +++ b/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts @@ -112,6 +112,7 @@ export function useAppliedStoresViewModel() { } return { + selectedFilter, filterLabel: getFilterLabel(selectedFilter), isDropdownOpen, dropdownRef, diff --git a/src/features/user/home/applied-stores/ui/AppliedStoreCard.tsx b/src/features/user/home/applied-stores/ui/AppliedStoreCard.tsx index 56648e4d..1683c2ae 100644 --- a/src/features/user/home/applied-stores/ui/AppliedStoreCard.tsx +++ b/src/features/user/home/applied-stores/ui/AppliedStoreCard.tsx @@ -1,8 +1,11 @@ -import { ApplicationStatusBadge } from '@/shared/ui/home/ApplicationStatusBadge' +import { + ApplicationStatusBadge, + type ApplicationStatusBadgeProps, +} from '@/shared/ui/home/ApplicationStatusBadge' interface AppliedStoreCardProps { storeName: string - status?: 'applied' | 'rejected' + status?: ApplicationStatusBadgeProps['status'] } export function AppliedStoreCard({ diff --git a/src/features/user/home/applied-stores/ui/AppliedStoreList.tsx b/src/features/user/home/applied-stores/ui/AppliedStoreList.tsx index a06f8ac3..b0610c84 100644 --- a/src/features/user/home/applied-stores/ui/AppliedStoreList.tsx +++ b/src/features/user/home/applied-stores/ui/AppliedStoreList.tsx @@ -1,10 +1,11 @@ import { MoreButton } from '@/shared/ui/common/MoreButton' import { AppliedStoreCard } from '@/features/user/home/applied-stores/ui/AppliedStoreCard' +import type { ApplicationStatusBadgeProps } from '@/shared/ui/home/ApplicationStatusBadge' interface AppliedStoreItem { id: number | string storeName: string - status: 'applied' | 'rejected' + status: ApplicationStatusBadgeProps['status'] } interface AppliedStoreListProps { diff --git a/src/features/user/home/applied-stores/ui/AppliedStoreListItem.tsx b/src/features/user/home/applied-stores/ui/AppliedStoreListItem.tsx index 133ffe66..8b1810d0 100644 --- a/src/features/user/home/applied-stores/ui/AppliedStoreListItem.tsx +++ b/src/features/user/home/applied-stores/ui/AppliedStoreListItem.tsx @@ -1,8 +1,11 @@ -import { ApplicationStatusBadge } from '@/shared/ui/home/ApplicationStatusBadge' +import { + ApplicationStatusBadge, + type ApplicationStatusBadgeProps, +} from '@/shared/ui/home/ApplicationStatusBadge' interface AppliedStoreListItemProps { storeName: string - status: 'applied' | 'rejected' + status: ApplicationStatusBadgeProps['status'] thumbnailUrl?: string onClick?: () => void } diff --git a/src/pages/notification/index.tsx b/src/pages/notification/index.tsx index e371f399..3652d0d0 100644 --- a/src/pages/notification/index.tsx +++ b/src/pages/notification/index.tsx @@ -69,9 +69,9 @@ function NotificationTypeFilter({
  • {isDropdownOpen && ( -
    - {filterOptions.map((option, index) => ( - +
      + {filterOptions.map(option => ( +
    • + +
    • ))} -
    + )} {isLoading ? ( -
    -

    로딩 중...

    +
    +
    ) : isError ? ( -
    -

    +

    +

    데이터를 불러오는 데 실패했습니다.

    ) : grouped.length === 0 ? ( -
    -

    +

    +

    지원 내역이 없습니다.

    @@ -114,14 +124,12 @@ export function AppliedStoresPage() {
    {shouldShowInfiniteListLoadMore(hasNextPage, totalCount) && ( - + /> )} )} diff --git a/src/pages/user/home/index.tsx b/src/pages/user/home/index.tsx index dc563d0d..dad19dd7 100644 --- a/src/pages/user/home/index.tsx +++ b/src/pages/user/home/index.tsx @@ -21,7 +21,7 @@ export function UserHomePage() { const { workspaces } = useWorkspacesViewModel() - const { grouped } = useAppliedStoresViewModel() + const { grouped, getCardStatus } = useAppliedStoresViewModel() const appliedStores = useMemo( () => @@ -31,9 +31,9 @@ export function UserHomePage() { .map(s => ({ id: s.id, storeName: s.storeName, - status: s.status === 'cancelled' ? 'rejected' : 'applied', + status: getCardStatus(s.status), })), - [grouped] + [grouped, getCardStatus] ) return ( From 3ebbd69bff34eff7a0834afa6741a5383dab6f27 Mon Sep 17 00:00:00 2001 From: Dohyeon Date: Fri, 12 Jun 2026 10:20:38 +0900 Subject: [PATCH 3/5] =?UTF-8?q?refactor:=20=EC=82=AC=EC=9E=A5=EB=8B=98=20?= =?UTF-8?q?=EB=A9=94=EC=9D=B8=ED=97=A4=EB=8D=94=20sticky=EC=86=8D=EC=84=B1?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/manager/home/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/manager/home/index.tsx b/src/pages/manager/home/index.tsx index 308bfc75..dd2f7b2f 100644 --- a/src/pages/manager/home/index.tsx +++ b/src/pages/manager/home/index.tsx @@ -61,7 +61,9 @@ export function ManagerHomePage() { return ( <>
    - +
    + +
    Date: Fri, 12 Jun 2026 10:53:48 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=EB=B1=83=EC=A7=80=20=EB=B6=88?= =?UTF-8?q?=ED=95=A9=EA=B2=A9/=EC=B7=A8=EC=86=8C=20=EC=84=B9=EC=85=98=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applied-stores/hooks/useAppliedStoresViewModel.ts | 8 ++++++-- .../user/home/applied-stores/types/application.ts | 5 +++-- .../user/home/applied-stores/types/appliedStore.ts | 6 +++++- src/shared/ui/home/ApplicationStatusBadge.tsx | 7 ++++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts b/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts index 4b5946cf..64c533e8 100644 --- a/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts +++ b/src/features/user/home/applied-stores/hooks/useAppliedStoresViewModel.ts @@ -19,20 +19,24 @@ const FILTER_OPTIONS: { key: FilterType; label: string }[] = [ { key: 'all', label: '전체' }, { key: 'submitted', label: '제출됨' }, { key: 'accepted', label: '수락됨' }, + { key: 'rejected', label: '불합격됨' }, { key: 'cancelled', label: '취소됨' }, ] const STATUS_SECTIONS: { key: ApplicationStatus; label: string }[] = [ { key: 'submitted', label: '제출됨' }, { key: 'accepted', label: '수락됨' }, + { key: 'rejected', label: '불합격됨' }, { key: 'cancelled', label: '취소됨' }, ] function getCardStatus( status: ApplicationStatus -): 'applied' | 'accepted' | 'rejected' { +): 'applied' | 'accepted' | 'rejected' | 'cancelled' { if (status === 'accepted') return 'accepted' - return status === 'cancelled' ? 'rejected' : 'applied' + if (status === 'rejected') return 'rejected' + if (status === 'cancelled') return 'cancelled' + return 'applied' } function getFilterLabel(filter: FilterType): string { diff --git a/src/features/user/home/applied-stores/types/application.ts b/src/features/user/home/applied-stores/types/application.ts index 6b9b1b59..386fc126 100644 --- a/src/features/user/home/applied-stores/types/application.ts +++ b/src/features/user/home/applied-stores/types/application.ts @@ -65,7 +65,8 @@ export const FILTER_TO_API_STATUS: Record = all: [], submitted: ['SUBMITTED', 'SHORTLISTED'], accepted: ['ACCEPTED'], - cancelled: ['CANCELLED', 'REJECTED', 'EXPIRED', 'DELETED'], + rejected: ['REJECTED'], + cancelled: ['CANCELLED', 'EXPIRED', 'DELETED'], } // ---- 근무 요일 파싱 ---- @@ -120,9 +121,9 @@ function mapApiStatusToUiStatus( apiStatus: ApplicationApiStatus ): ApplicationStatus { if (apiStatus === 'ACCEPTED') return 'accepted' + if (apiStatus === 'REJECTED') return 'rejected' if ( apiStatus === 'CANCELLED' || - apiStatus === 'REJECTED' || apiStatus === 'EXPIRED' || apiStatus === 'DELETED' ) diff --git a/src/features/user/home/applied-stores/types/appliedStore.ts b/src/features/user/home/applied-stores/types/appliedStore.ts index 3c5624d9..3c75643e 100644 --- a/src/features/user/home/applied-stores/types/appliedStore.ts +++ b/src/features/user/home/applied-stores/types/appliedStore.ts @@ -1,4 +1,8 @@ -export type ApplicationStatus = 'submitted' | 'accepted' | 'cancelled' +export type ApplicationStatus = + | 'submitted' + | 'accepted' + | 'rejected' + | 'cancelled' export type FilterType = 'all' | ApplicationStatus diff --git a/src/shared/ui/home/ApplicationStatusBadge.tsx b/src/shared/ui/home/ApplicationStatusBadge.tsx index 5c1cd2fa..363fe310 100644 --- a/src/shared/ui/home/ApplicationStatusBadge.tsx +++ b/src/shared/ui/home/ApplicationStatusBadge.tsx @@ -1,5 +1,5 @@ interface ApplicationStatusBadgeProps { - status: 'applied' | 'accepted' | 'rejected' + status: 'applied' | 'accepted' | 'rejected' | 'cancelled' className?: string } @@ -19,6 +19,11 @@ const BADGE_STYLE_MAP = { containerClassName: 'bg-error border border-error', textClassName: 'text-white', }, + cancelled: { + label: '취소됨', + containerClassName: 'bg-white border border-line-2', + textClassName: 'text-text-50', + }, } as const export function ApplicationStatusBadge({ From 75e9be849debb53a9a8df8f0945f7afc0856b6a5 Mon Sep 17 00:00:00 2001 From: Dohyeon Date: Fri, 12 Jun 2026 14:13:14 +0900 Subject: [PATCH 5/5] =?UTF-8?q?remove:=20=ED=96=84=EB=B2=84=EA=B1=B0=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/nav/calendar.svg | 6 - src/assets/icons/nav/menu.svg | 5 - src/assets/icons/nav/store.svg | 7 - src/assets/icons/nav/swap.svg | 6 - src/assets/icons/nav/users.svg | 6 - src/assets/icons/nav/wallet.svg | 5 - src/assets/icons/nav/x.svg | 4 - src/shared/ui/common/HamburgerMenuDrawer.tsx | 180 ------------------- src/shared/ui/common/Navbar.tsx | 114 +++++------- 9 files changed, 48 insertions(+), 285 deletions(-) delete mode 100644 src/assets/icons/nav/calendar.svg delete mode 100644 src/assets/icons/nav/menu.svg delete mode 100644 src/assets/icons/nav/store.svg delete mode 100644 src/assets/icons/nav/swap.svg delete mode 100644 src/assets/icons/nav/users.svg delete mode 100644 src/assets/icons/nav/wallet.svg delete mode 100644 src/assets/icons/nav/x.svg delete mode 100644 src/shared/ui/common/HamburgerMenuDrawer.tsx diff --git a/src/assets/icons/nav/calendar.svg b/src/assets/icons/nav/calendar.svg deleted file mode 100644 index c9cfcda9..00000000 --- a/src/assets/icons/nav/calendar.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/assets/icons/nav/menu.svg b/src/assets/icons/nav/menu.svg deleted file mode 100644 index caba79e6..00000000 --- a/src/assets/icons/nav/menu.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/assets/icons/nav/store.svg b/src/assets/icons/nav/store.svg deleted file mode 100644 index fcd177d5..00000000 --- a/src/assets/icons/nav/store.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/assets/icons/nav/swap.svg b/src/assets/icons/nav/swap.svg deleted file mode 100644 index e55c1cb6..00000000 --- a/src/assets/icons/nav/swap.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/assets/icons/nav/users.svg b/src/assets/icons/nav/users.svg deleted file mode 100644 index aca6ec88..00000000 --- a/src/assets/icons/nav/users.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/assets/icons/nav/wallet.svg b/src/assets/icons/nav/wallet.svg deleted file mode 100644 index aff4f0ab..00000000 --- a/src/assets/icons/nav/wallet.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/assets/icons/nav/x.svg b/src/assets/icons/nav/x.svg deleted file mode 100644 index 7497a770..00000000 --- a/src/assets/icons/nav/x.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/shared/ui/common/HamburgerMenuDrawer.tsx b/src/shared/ui/common/HamburgerMenuDrawer.tsx deleted file mode 100644 index f84be070..00000000 --- a/src/shared/ui/common/HamburgerMenuDrawer.tsx +++ /dev/null @@ -1,180 +0,0 @@ -import { useEffect } from 'react' -import { createPortal } from 'react-dom' -import { useNavigate } from 'react-router-dom' -import StoreIcon from '@/assets/icons/nav/store.svg' -import UsersIcon from '@/assets/icons/nav/users.svg' -import CalendarIcon from '@/assets/icons/nav/calendar.svg' -import WalletIcon from '@/assets/icons/nav/wallet.svg' -import SwapIcon from '@/assets/icons/nav/swap.svg' -import CloseXIcon from '@/assets/icons/nav/x.svg' -import { cn } from '@/shared/lib/utils' -import { ROUTES } from '@/shared/constants/routes' -import useAuthStore from '@/shared/stores/useAuthStore' - -export interface HamburgerMenuDrawerProps { - open: boolean - onClose: () => void -} - -type MenuRow = { - label: string - icon: string - path: string -} - -const MANAGER_ITEMS: MenuRow[] = [ - { label: '업장 관리', icon: StoreIcon, path: ROUTES.USER.WORKSPACE }, - { label: '직원 관리', icon: UsersIcon, path: ROUTES.MANAGER.HOME }, - { - label: '근무 일정 관리', - icon: CalendarIcon, - path: ROUTES.MANAGER.WORKER_SCHEDULE, - }, - { label: '급여 관리', icon: WalletIcon, path: ROUTES.MY.ROOT }, -] - -const USER_ITEMS: MenuRow[] = [ - { label: '내 근무 일정', icon: CalendarIcon, path: ROUTES.USER.SCHEDULE }, - { label: '급여 확인', icon: WalletIcon, path: ROUTES.MY.ROOT }, - { label: '대타 요청', icon: SwapIcon, path: ROUTES.USER.SUBSTITUTE_REQUEST }, -] - -function MenuList({ - items, - accentClass, - onNavigate, -}: { - items: MenuRow[] - accentClass: string - onNavigate: (path: string) => void -}) { - return ( -
      - {items.map(row => ( -
    • - -
    • - ))} -
    - ) -} - -export function HamburgerMenuDrawer({ - open, - onClose, -}: HamburgerMenuDrawerProps) { - const navigate = useNavigate() - const scope = useAuthStore(s => s.scope) - - useEffect(() => { - if (!open) { - return - } - const onKeyDown = (e: KeyboardEvent) => { - if (e.key === 'Escape') { - onClose() - } - } - const prevOverflow = document.body.style.overflow - document.body.style.overflow = 'hidden' - document.addEventListener('keydown', onKeyDown) - return () => { - document.body.style.overflow = prevOverflow - document.removeEventListener('keydown', onKeyDown) - } - }, [open, onClose]) - - if (!open || typeof document === 'undefined') { - return null - } - - const handleNavigate = (path: string) => { - navigate(path) - onClose() - } - - const isManager = scope === 'MANAGER' - const isUser = scope === 'USER' || scope === null - - return createPortal( -
    - -
    - -
    - {isManager && ( -
    -

    - 사장님 -

    - -
    - )} - - {isUser && !isManager && ( -
    -

    - 알바생 -

    - -
    - )} -
    - -
    , - document.body - ) -} diff --git a/src/shared/ui/common/Navbar.tsx b/src/shared/ui/common/Navbar.tsx index c4d18bce..b3f67974 100644 --- a/src/shared/ui/common/Navbar.tsx +++ b/src/shared/ui/common/Navbar.tsx @@ -1,10 +1,8 @@ -import { useState, type ReactNode } from 'react' +import type { ReactNode } from 'react' import { AlterLogo } from '@/shared/ui/common/AlterLogo' import BellIcon from '@/assets/icons/nav/bell.svg' -import MenuIcon from '@/assets/icons/nav/menu.svg' import ChevronLeftIcon from '@/assets/icons/nav/chevron-left.svg' import { useNavigate } from 'react-router-dom' -import { HamburgerMenuDrawer } from '@/shared/ui/common/HamburgerMenuDrawer' import { cn } from '@/shared/lib/utils' type NavbarVariant = 'main' | 'detail' @@ -33,7 +31,6 @@ export function Navbar({ onNotificationClick, }: NavbarProps) { const navigate = useNavigate() - const [menuOpen, setMenuOpen] = useState(false) const isMain = variant === 'main' const handleBackClick = () => { @@ -45,70 +42,55 @@ export function Navbar({ } return ( - <> -
    +
    + {isMain ? ( +
    + + 알터 +
    + ) : ( + )} - > -
    - {isMain ? ( -
    - - 알터 -
    - ) : ( - - )} -
    +
    -
    - {!isMain && ( - - {title} - - )} -
    +
    + {!isMain && ( + + {title} + + )} +
    -
    - {isMain ? ( - <> - - - - ) : ( - rightAction - )} -
    -
    - setMenuOpen(false)} /> - +
    + {isMain ? ( + + ) : ( + rightAction + )} +
    + ) }