Skip to content

Commit

Permalink
fix: 알림 권항 요청 위치 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeml06 committed Aug 20, 2024
1 parent 694818f commit 05a520e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions frontend/src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/pages/MainPage/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<MainPageTab>('모임목록');
const [isDarakbangMenuOpened, setIsDarakbangMenuOpened] = useState(false);

Expand All @@ -40,6 +41,7 @@ export default function MainPage() {

const handleNotification = () => {
navigate(ROUTES.notification);
requestPermission(mutate);
};

const darakbangMenuOption = useMemo(() => {
Expand Down

0 comments on commit 05a520e

Please sign in to comment.