Skip to content

Commit

Permalink
[#627] 불필요한 utils, hooks, constants 정리 및 import문 통일 (#631)
Browse files Browse the repository at this point in the history
* chore: 불필요한 constants, utils, hooks 제거

* chore: 컴포넌트 import문 절대경로 수정

* chore: 누락된 import문 수정

* fix: 잘못된 변경내용 삭제
  • Loading branch information
hanyugeon authored Jun 16, 2024
1 parent 7dae3f9 commit 862289f
Show file tree
Hide file tree
Showing 59 changed files with 83 additions and 1,689 deletions.
2 changes: 1 addition & 1 deletion src/apis/user.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { APIJob, APIJobGroup } from '@/types/job';
import { APIUser, APIUserProfile } from '@/types/user';
import { publicApi } from './core/axios';
import { publicApi } from '@/apis/core/axios';

const userAPI = {
getUserProfile: ({ userId }: { userId: APIUser['userId'] }) =>
Expand Down
2 changes: 1 addition & 1 deletion src/app/bookshelf/[bookshelfId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import useMutateBookshelfLikeQuery from '@/queries/bookshelf/useMutateBookshelfL
import { useMyProfileId } from '@/queries/user/useMyProfileQuery';
import { checkAuthentication } from '@/utils/helpers';
import { IconKakao } from '@public/icons';
import { KAKAO_LOGIN_URL } from '@/constants/url';
import { KAKAO_LOGIN_URL } from '@/constants';

import useToast from '@/v1/base/Toast/useToast';
import TopNavigation from '@/v1/base/TopNavigation';
Expand Down
2 changes: 1 addition & 1 deletion src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Image from 'next/image';
import Link from 'next/link';

import { IconKakao } from '@public/icons';
import { KAKAO_LOGIN_URL } from '@/constants/url';
import { KAKAO_LOGIN_URL } from '@/constants';

import Button from '@/v1/base/Button';

Expand Down
7 changes: 3 additions & 4 deletions src/app/profile/me/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useQueryClient } from '@tanstack/react-query';

import userAPI from '@/apis/user';
import userKeys from '@/queries/user/key';

import { checkAuthentication, removeAuth } from '@/utils/helpers';

import { KAKAO_LOGIN_URL } from '@/constants';
import { IconArrowRight } from '@public/icons';

import SSRSafeSuspense from '@/components/SSRSafeSuspense';
Expand All @@ -20,11 +22,8 @@ import BookShelf from '@/v1/bookShelf/BookShelf';
import ProfileBookShelf from '@/v1/profile/bookShelf/ProfileBookShelf';
import ProfileGroup from '@/v1/profile/group/ProfileGroup';
import ProfileInfo from '@/v1/profile/info/ProfileInfo';
import userKeys from '@/queries/user/key';
import { useQueryClient } from '@tanstack/react-query';

const USER_ID = 'me';
const KAKAO_LOGIN_URL = `${process.env.NEXT_PUBLIC_API_URL}/oauth2/authorize/kakao?redirect_uri=${process.env.NEXT_PUBLIC_CLIENT_REDIRECT_URI}`;

const MyProfilePage = () => {
const isAuthenticated = checkAuthentication();
Expand Down
120 changes: 0 additions & 120 deletions src/constants/FormRule/index.ts

This file was deleted.

43 changes: 0 additions & 43 deletions src/constants/groupRadioValues.ts
Original file line number Diff line number Diff line change
@@ -1,46 +1,3 @@
export const MAX_MEMBER_COUNT_VALUE = [
{
value: 'null',
text: '제한없음',
},
{
value: '500',
text: '500명',
},
{
value: '200',
text: '200명',
},
{
value: '100',
text: '100명',
},
{
value: '50',
text: '50명',
},
{
value: '직접입력',
text: '직접입력',
},
];

export const MAX_MEMBER_DEFAULT_VALUE = 'null';

export const IS_PUBLICK_VALUE = [
{ value: 'true', text: '공개' },
{ value: 'false', text: '비공개' },
];

export const IS_PUBLICK_DEFAULT_VALUE = 'true';

export const HAS_JOIN_PASSWORD_VALUE = [
{ value: 'true', text: '필요' },
{ value: 'false', text: '불필요' },
];

export const HAS_JOIN_PASSWORD_DEFAULT_VALUE = 'false';

export const MAX_MEMBER_COUNT_OPTIONS = [
{ label: '제한없음', value: 9999 },
{ label: '50명', value: 50 },
Expand Down
1 change: 1 addition & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './storage';
export * from './error';
export * from './groupRadioValues';
export * from './url';
38 changes: 0 additions & 38 deletions src/constants/initialBookGroupComments.ts

This file was deleted.

22 changes: 0 additions & 22 deletions src/hooks/auth/atoms/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/hooks/auth/index.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/hooks/auth/useAuth.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/hooks/toast/atoms/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/hooks/toast/index.ts

This file was deleted.

29 changes: 0 additions & 29 deletions src/hooks/toast/useToast.ts

This file was deleted.

21 changes: 0 additions & 21 deletions src/hooks/useScroll.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/hooks/useToggle.ts

This file was deleted.

Loading

0 comments on commit 862289f

Please sign in to comment.