Skip to content

Commit

Permalink
fix(client): 이메일 유입률 확인 페이지 액세스 토큰 여부를 통해 로그인 여부를 확인하는 로직으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
SEOKKAMONI committed Apr 23, 2024
1 parent 9c85a21 commit ed24d84
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/client/src/app/email/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

import { useRouter } from 'next/navigation';
import { useLayoutEffect } from 'react';
import { useUser } from '@/hooks/common/useUser';
import { LocalStorage } from '@/libs/api/storage';
import { useLogAnalyticsEvent } from '@/libs/logging';

const EmailPage = () => {
const router = useRouter();
const { logShowEvent } = useLogAnalyticsEvent();
const { user } = useUser();

useLayoutEffect(() => {
const isLogin = Boolean(LocalStorage.getItem('siac'));

logShowEvent({ name: 'show_email_entry_site' });

if (user.isLogin) {
if (isLogin) {
router.replace('/notification');
} else {
router.replace('/');
Expand Down

0 comments on commit ed24d84

Please sign in to comment.