Skip to content

Commit

Permalink
refactor: ROUTE_PATH 상수 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
ukkodeveloper committed Sep 11, 2023
1 parent 4bf1ed1 commit 66392c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/pages/MyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Flex from '@/shared/components/Flex';
import Spacing from '@/shared/components/Spacing';
import SRHeading from '@/shared/components/SRHeading';
import useToastContext from '@/shared/components/Toast/hooks/useToastContext';
import ROUTE_PATH from '@/shared/constants/path';
import useFetch from '@/shared/hooks/useFetch';
import fetcher from '@/shared/remotes';
import { secondsToMinSec, toPlayingTimeText } from '@/shared/utils/convertTime';
Expand Down Expand Up @@ -38,11 +39,11 @@ const MyPage = () => {

const logoutRedirect = () => {
logout();
navigate('/');
navigate(ROUTE_PATH.ROOT);
};

const redirectEditPage = () => {
navigate('/my-page/edit');
navigate(`/${ROUTE_PATH.EDIT_PROFILE}`);
};

if (!likes) return null;
Expand Down

0 comments on commit 66392c0

Please sign in to comment.