Skip to content

Commit

Permalink
Merge pull request #498 from woowacourse-teams/feature/#468
Browse files Browse the repository at this point in the history
로그인상태에서 로그인,회원가입페이지 접근시 홈으로 리다이렉트
  • Loading branch information
dladncks1217 authored Aug 17, 2023
2 parents 56ae5f3 + 3ee9446 commit 6aa39a2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/src/constants/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ export const EXPENSE_CATEGORY_INFORMATION_SKELETON_LENGTH = 6;

export const EXPENSE_LIST_SKELETON_LENGTH = 5;

export const TRIP_TITLE_MAX_LENGTH = 15;
export const TRIP_TITLE_MAX_LENGTH = 14;

export const TRIP_DESCRIPTION_MAX_LENGTH = 125;
export const TRIP_DESCRIPTION_MAX_LENGTH = 124;

export const DAYLOG_TITLE_MAX_LENGTH = 25;
export const DAYLOG_TITLE_MAX_LENGTH = 24;

export const TRIP_ITEM_TITLE_MAX_LENGTH = 20;

export const TRIP_ITEM_MEMO_MAX_LENGTH = 255;
export const TRIP_ITEM_MEMO_MAX_LENGTH = 254;

export const NICKNAME_MAX_LENGTH = 15;
export const NICKNAME_MAX_LENGTH = 14;

export const MOBILE_MEDIA_QUERY_SIZE = '(max-width: 600px)';

Expand Down
12 changes: 12 additions & 0 deletions frontend/src/pages/LogInPage/LogInPage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { Navigate } from 'react-router-dom';

import { useRecoilValue } from 'recoil';

import { Flex, Heading, Theme } from 'hang-log-design-system';

import {
Expand All @@ -10,10 +14,18 @@ import {
import GoogleButton from '@components/common/GoogleButton/GoogleButton';
import KakaoButton from '@components/common/KakaoButton/KakaoButton';

import { isLoggedInState } from '@store/auth';

import { PATH } from '@constants/path';

import AuthImage from '@assets/svg/auth-image.svg';
import LogoVertical from '@assets/svg/logo-vertical.svg';

const LogInPage = () => {
const isLoggedIn = useRecoilValue(isLoggedInState);

if (isLoggedIn) return <Navigate to={PATH.ROOT} />;

return (
<Flex
styles={{ direction: 'column', justify: 'center', align: 'center' }}
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/pages/SignUpPage/SignUpPage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { Navigate } from 'react-router-dom';

import { useRecoilValue } from 'recoil';

import { Flex, Heading, Theme } from 'hang-log-design-system';

import {
Expand All @@ -10,10 +14,18 @@ import {
import GoogleButton from '@components/common/GoogleButton/GoogleButton';
import KakaoButton from '@components/common/KakaoButton/KakaoButton';

import { isLoggedInState } from '@store/auth';

import { PATH } from '@constants/path';

import AuthImage from '@assets/svg/auth-image.svg';
import LogoVertical from '@assets/svg/logo-vertical.svg';

const SignUpPage = () => {
const isLoggedIn = useRecoilValue(isLoggedInState);

if (isLoggedIn) return <Navigate to={PATH.ROOT} />;

return (
<Flex
styles={{ direction: 'column', justify: 'center', align: 'center' }}
Expand Down

0 comments on commit 6aa39a2

Please sign in to comment.