From ce59fd8c106478454629e7c126697ab2492c11d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B0=AC=EC=98=81?= Date: Thu, 27 Nov 2025 21:12:51 +0900 Subject: [PATCH] =?UTF-8?q?API=20=ED=98=B8=EC=B6=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/useGetNotificationPresent.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/useGetNotificationPresent.ts b/src/api/useGetNotificationPresent.ts index 6ec218d..bba1ce9 100644 --- a/src/api/useGetNotificationPresent.ts +++ b/src/api/useGetNotificationPresent.ts @@ -1,11 +1,13 @@ import { useQuery } from '@tanstack/react-query'; import { request } from './config'; +import { getAccessToken } from '@/components/login/Auth/token'; interface NotificationPresentResponse { present: boolean; } export function useGetNotificationPresent() { + const accessToken = getAccessToken(); return useQuery({ queryKey: ['notificationPresent'], queryFn: () => @@ -13,5 +15,6 @@ export function useGetNotificationPresent() { method: 'GET', url: '/notifications/present', }), + enabled: !!accessToken, }); }