From 05a520e191a73acc9b21909f190066ec065e8797 Mon Sep 17 00:00:00 2001 From: jaeml06 Date: Tue, 20 Aug 2024 19:34:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=95=8C=EB=A6=BC=20=EA=B6=8C=ED=95=AD?= =?UTF-8?q?=20=EC=9A=94=EC=B2=AD=20=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/HomePage/HomePage.tsx | 6 ++---- frontend/src/pages/MainPage/MainPage.tsx | 6 ++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/HomePage/HomePage.tsx b/frontend/src/pages/HomePage/HomePage.tsx index 3c5e38526..f4491df53 100644 --- a/frontend/src/pages/HomePage/HomePage.tsx +++ b/frontend/src/pages/HomePage/HomePage.tsx @@ -2,13 +2,11 @@ import KakaoOAuthLoginIcon from '@_components/Icons/KakaoOAuthIcon'; import MainLogoIcon from '@_components/Icons/MainLogoIcon'; import LoginLayout from '@_layouts/LoginLayout/LoginLayout'; import { css, useTheme } from '@emotion/react'; -import { requestPermission } from '@_service/notification'; -import useServeToken from '@_hooks/mutaions/useServeToken'; + export default function HomePage() { const theme = useTheme(); - const { mutate } = useServeToken(); + const kakaoAuthLogin = () => { - requestPermission(mutate); if ( !process.env.KAKAO_O_AUTH_CLIENT_ID || !process.env.KAKAO_O_AUTH_REDIRECT_URI diff --git a/frontend/src/pages/MainPage/MainPage.tsx b/frontend/src/pages/MainPage/MainPage.tsx index 9ce75c019..fb591b0c6 100644 --- a/frontend/src/pages/MainPage/MainPage.tsx +++ b/frontend/src/pages/MainPage/MainPage.tsx @@ -21,10 +21,11 @@ import SolidArrow from '@_components/Icons/SolidArrow'; import useMyDarakbangs from '@_hooks/queries/useMyDarakbang'; import useMyRoleInDarakbang from '@_hooks/queries/useMyDarakbangRole'; import { useNavigate } from 'react-router-dom'; - +import { requestPermission } from '@_service/notification'; +import useServeToken from '@_hooks/mutaions/useServeToken'; export default function MainPage() { const navigate = useNavigate(); - + const { mutate } = useServeToken(); const [currentTab, setCurrentTab] = useState('모임목록'); const [isDarakbangMenuOpened, setIsDarakbangMenuOpened] = useState(false); @@ -40,6 +41,7 @@ export default function MainPage() { const handleNotification = () => { navigate(ROUTES.notification); + requestPermission(mutate); }; const darakbangMenuOption = useMemo(() => {