Skip to content

Commit 862289f

Browse files
authored
[#627] 불필요한 utils, hooks, constants 정리 및 import문 통일 (#631)
* chore: 불필요한 constants, utils, hooks 제거 * chore: 컴포넌트 import문 절대경로 수정 * chore: 누락된 import문 수정 * fix: 잘못된 변경내용 삭제
1 parent 7dae3f9 commit 862289f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+83
-1689
lines changed

src/apis/user.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { APIJob, APIJobGroup } from '@/types/job';
22
import { APIUser, APIUserProfile } from '@/types/user';
3-
import { publicApi } from './core/axios';
3+
import { publicApi } from '@/apis/core/axios';
44

55
const userAPI = {
66
getUserProfile: ({ userId }: { userId: APIUser['userId'] }) =>

src/app/bookshelf/[bookshelfId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import useMutateBookshelfLikeQuery from '@/queries/bookshelf/useMutateBookshelfL
1212
import { useMyProfileId } from '@/queries/user/useMyProfileQuery';
1313
import { checkAuthentication } from '@/utils/helpers';
1414
import { IconKakao } from '@public/icons';
15-
import { KAKAO_LOGIN_URL } from '@/constants/url';
15+
import { KAKAO_LOGIN_URL } from '@/constants';
1616

1717
import useToast from '@/v1/base/Toast/useToast';
1818
import TopNavigation from '@/v1/base/TopNavigation';

src/app/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Image from 'next/image';
44
import Link from 'next/link';
55

66
import { IconKakao } from '@public/icons';
7-
import { KAKAO_LOGIN_URL } from '@/constants/url';
7+
import { KAKAO_LOGIN_URL } from '@/constants';
88

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

src/app/profile/me/page.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
import Link from 'next/link';
44
import { useRouter } from 'next/navigation';
5+
import { useQueryClient } from '@tanstack/react-query';
56

67
import userAPI from '@/apis/user';
8+
import userKeys from '@/queries/user/key';
79

810
import { checkAuthentication, removeAuth } from '@/utils/helpers';
9-
11+
import { KAKAO_LOGIN_URL } from '@/constants';
1012
import { IconArrowRight } from '@public/icons';
1113

1214
import SSRSafeSuspense from '@/components/SSRSafeSuspense';
@@ -20,11 +22,8 @@ import BookShelf from '@/v1/bookShelf/BookShelf';
2022
import ProfileBookShelf from '@/v1/profile/bookShelf/ProfileBookShelf';
2123
import ProfileGroup from '@/v1/profile/group/ProfileGroup';
2224
import ProfileInfo from '@/v1/profile/info/ProfileInfo';
23-
import userKeys from '@/queries/user/key';
24-
import { useQueryClient } from '@tanstack/react-query';
2525

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

2928
const MyProfilePage = () => {
3029
const isAuthenticated = checkAuthentication();

src/constants/FormRule/index.ts

Lines changed: 0 additions & 120 deletions
This file was deleted.

src/constants/groupRadioValues.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
export const MAX_MEMBER_COUNT_VALUE = [
2-
{
3-
value: 'null',
4-
text: '제한없음',
5-
},
6-
{
7-
value: '500',
8-
text: '500명',
9-
},
10-
{
11-
value: '200',
12-
text: '200명',
13-
},
14-
{
15-
value: '100',
16-
text: '100명',
17-
},
18-
{
19-
value: '50',
20-
text: '50명',
21-
},
22-
{
23-
value: '직접입력',
24-
text: '직접입력',
25-
},
26-
];
27-
28-
export const MAX_MEMBER_DEFAULT_VALUE = 'null';
29-
30-
export const IS_PUBLICK_VALUE = [
31-
{ value: 'true', text: '공개' },
32-
{ value: 'false', text: '비공개' },
33-
];
34-
35-
export const IS_PUBLICK_DEFAULT_VALUE = 'true';
36-
37-
export const HAS_JOIN_PASSWORD_VALUE = [
38-
{ value: 'true', text: '필요' },
39-
{ value: 'false', text: '불필요' },
40-
];
41-
42-
export const HAS_JOIN_PASSWORD_DEFAULT_VALUE = 'false';
43-
441
export const MAX_MEMBER_COUNT_OPTIONS = [
452
{ label: '제한없음', value: 9999 },
463
{ label: '50명', value: 50 },

src/constants/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from './storage';
22
export * from './error';
33
export * from './groupRadioValues';
4+
export * from './url';

src/constants/initialBookGroupComments.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/hooks/auth/atoms/index.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/hooks/auth/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)