Skip to content

Commit

Permalink
feat: 공지사항 페이지 준비중 알림 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
presentKey committed Apr 21, 2024
1 parent 9a81ab0 commit 5180a99
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/Layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { BOOKMARK } from "@/features/users/hooks/useTabMenu";
import Avatar from "../Avatar";
import Button from "../Button";
import Drawer from "../Drawer";
import useSnackBar from "../SnackBar/useSnackBar";

import Navigation from "./Navigation";
import { NavItem } from "./Navigation/NavigationItem";
Expand Down Expand Up @@ -67,6 +68,7 @@ export default function Sidebar({
const { user, logout } = useAuth();
const [isLoginModalVisible, setIsLoginModalVisible] = useState(false);
const navigate = useNavigate();
const snackBar = useSnackBar();

const handleClickUserMenu = (id: string, e: React.MouseEvent) => {
e.preventDefault();
Expand All @@ -88,6 +90,12 @@ export default function Sidebar({
}
};

/** 공지사항 페이지 - 준비중인 기능 */
const handleNoticeMenu = (_: string, e: React.MouseEvent) => {
e.preventDefault();
snackBar.open({ message: "준비중인 기능입니다." });
};

const handleLogout = (_id: string, e: React.MouseEvent) => {
e.preventDefault();
logout();
Expand Down Expand Up @@ -144,7 +152,11 @@ export default function Sidebar({
<Divider />
<Navigation.Content>
{helpMenuItems.map((item) => (
<Navigation.Item key={item.id} item={item} onClick={onClickItem} />
<Navigation.Item
key={item.id}
item={item}
onClick={item.id === "notice" ? handleNoticeMenu : onClickItem}
/>
))}
{user && (
<Navigation.Item
Expand Down

0 comments on commit 5180a99

Please sign in to comment.