Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions apps/nowait-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@
"dependencies": {
"@repo/ui": "workspace:*",
"@tanstack/react-query": "^5.81.2",
"@tiptap/core": "^3.0.7",
"@tiptap/extension-underline": "^3.0.7",
"@tiptap/pm": "^3.0.7",
"@tiptap/react": "^3.0.7",
"@tiptap/starter-kit": "^3.0.7",
"@toast-ui/editor": "^3.2.2",
"@toast-ui/react-editor": "^3.2.3",
"axios": "^1.10.0",
"clsx": "^2.1.1",
"lucide-react": "^0.522.0",
"prosemirror-model": "^1.25.2",
"prosemirror-state": "^1.4.3",
"prosemirror-transform": "^1.10.4",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-quill": "^2.0.0",
"react-router": "^7.6.2",
"react-router-dom": "^7.6.2"
},
Expand Down
3 changes: 3 additions & 0 deletions apps/nowait-admin/src/assets/alarm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions apps/nowait-admin/src/assets/boothIconActive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/nowait-admin/src/assets/booth_thumbnail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/nowait-admin/src/assets/drop_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions apps/nowait-admin/src/assets/edit_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions apps/nowait-admin/src/assets/image_placeholder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions apps/nowait-admin/src/assets/orderIconActive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions apps/nowait-admin/src/assets/statIconActive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions apps/nowait-admin/src/assets/waitIconActive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 59 additions & 9 deletions apps/nowait-admin/src/components/AdminSidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import React from "react";
import { NavLink, useNavigate } from "react-router-dom";
import { Clock, Layers, BarChart2 } from "lucide-react";
import { useWindowWidth } from "../hooks/useWindowWidth";
import { useLocation } from "react-router-dom";
import NwIcon from "../assets/nwLogo.svg?react";
import NwTextIcon from "../assets/nw_text_logo.svg?react";
import ArrowDown from "../assets/keyboard_arrow_down.svg?react";
import profile from "../assets/profile.png";
import waitIcon from "../assets/Waiting.svg"; // 대기 아이콘 등
import orderIcon from "../assets/Order.svg";
import statIcon from "../assets/Statistics.svg";
import boothIcon from "../assets/Tent.svg";
import waitIconActive from "../assets/waitIconActive.svg";
import orderIconActive from "../assets/orderIconActive.svg";
import statIconActive from "../assets/statIconActive.svg";
import boothIconActive from "../assets/boothIconActive.svg";

const AdminSidebar = () => {
const width = useWindowWidth();
Expand All @@ -16,12 +24,18 @@ const AdminSidebar = () => {
if (width < 768) return null;

const isCompact = width < 1024;
const location = useLocation();
const pathname = location.pathname;

return (
<aside
className={`
h-screen flex flex-col justify-between bg-white px-4 py-6 fixed
${isCompact ? "w-[60px] items-center" : "w-[210px]"}
h-screen flex flex-col justify-between bg-white fixed
${
isCompact
? "w-[60px] items-center px-[10px] py-5"
: "w-[210px] px-4 py-6"
}
`}
>
{/* 상단: 로고 & 메뉴 */}
Expand Down Expand Up @@ -49,22 +63,54 @@ const AdminSidebar = () => {
<nav className="flex flex-col gap-2">
<NavItem
to="/admin"
icon={<Clock className="w-5 h-5" />}
icon={
<img
src={pathname === "/admin" ? waitIconActive : waitIcon}
alt="웨이팅"
className="w-5 h-5"
/>
}
label="웨이팅"
compact={isCompact}
/>
<NavItem
to="/admin/orders"
icon={<Layers className="w-5 h-5" />}
icon={
<img
src={pathname === "/admin/orders" ? orderIconActive : orderIcon}
alt="주문"
className="w-5 h-5"
/>
}
label="주문"
compact={isCompact}
/>
<NavItem
to="/admin/analytics"
icon={<BarChart2 className="w-5 h-5" />}
icon={
<img
src={
pathname === "/admin/analytics" ? statIconActive : statIcon
}
alt="관리 및 통계"
className="w-5 h-5"
/>
}
label="관리 · 통계"
compact={isCompact}
/>
<NavItem
to="/admin/booth"
icon={
<img
src={pathname === "/admin/booth" ? boothIconActive : boothIcon}
alt="부스 관리"
className="w-5 h-5"
/>
}
label="부스"
compact={isCompact}
/>
</nav>
</div>

Expand All @@ -73,7 +119,7 @@ const AdminSidebar = () => {
<img
src={profile}
alt="프로필"
className="w-8 h-8 rounded-full object-cover"
className="w-9 h-9 rounded-full object-cover"
/>
{!isCompact && (
<div className="flex flex-row">
Expand Down Expand Up @@ -101,9 +147,13 @@ const NavItem = ({ to, icon, label, compact }: NavItemProps) => {
to={to}
end
className={({ isActive }) =>
`flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-semibold justify-center ${
`flex items-center rounded-lg text-sm font-semibold ${
isActive ? "bg-gray-100 text-black" : "text-gray-400"
} ${compact ? "justify-center" : "justify-start"}`
} ${
compact
? "justify-center w-10 h-10"
: "justify-start px-4 py-2 gap-[8px]"
}`
}
>
{icon}
Expand Down
Loading