Skip to content

Commit

Permalink
Merge pull request #44 from DDD-Community/feat/#28
Browse files Browse the repository at this point in the history
[feat/#28] 로그아웃 시에 알림 설정도 로컬 스토리지에서 지우도록 수정
  • Loading branch information
lkhoony authored Aug 31, 2024
2 parents 59d4e0a + 8cb8955 commit be8166b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Link, useLocation, useNavigate } from "react-router-dom"
import { useSnapshotStore } from "@/store/SnapshotStore"
import { useMemo } from "react"
import { clearAccessToken } from "@/api/axiosInstance"
import { useNotificationStore } from "@/store/NotificationStore"

const navItems = [
{
Expand Down Expand Up @@ -35,10 +36,12 @@ export default function SideNav(): React.ReactElement {
const logoutHandler = (): void => {
const clearUser = useAuthStore.persist.clearStorage
const clearSnapshot = useSnapshotStore.persist.clearStorage
const clearNotification = useNotificationStore.persist.clearStorage

clearUser()
clearSnapshot()
clearAccessToken()
clearNotification()

logout(() => {
navigate("/")
Expand Down

0 comments on commit be8166b

Please sign in to comment.