Skip to content

Commit

Permalink
Merge pull request #466 from New-Barams/feat/#460/import-index
Browse files Browse the repository at this point in the history
[민우] - 각 파일 import문 수정
  • Loading branch information
MinwooP authored Feb 4, 2024
2 parents 60bd28a + 7d55b01 commit 0ca4763
Show file tree
Hide file tree
Showing 18 changed files with 67 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import { Button } from '@/components';
import { ajajaToast } from '@/components/Toaster/customToast';
import { SESSION_STORAGE_KEY } from '@/constants';
import { usePostNewPlanMutation } from '@/hooks/apis/usePostNewPlanMutation';
import { PlanContentType } from '@/types/Plan';
import { RemindItemType, RemindOptionType } from '@/types/Remind';
import { PostNewPlanRequestBody } from '@/types/apis/plan/PostNewPlan';
import { PlanContentType, RemindItemType, RemindOptionType } from '@/types';
import { PostNewPlanRequestBody } from '@/types/apis';
import { changeRemindTimeToString } from '@/utils/changeRemindTimeToString';
import classNames from 'classnames';
import { useRouter } from 'next/navigation';
Expand Down
7 changes: 3 additions & 4 deletions src/app/(header)/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import {
CreatePlanIcon,
CreatePlanRemindDate,
CreatePlanRemindMessage,
ModalContinueCreate,
ModalFixRemindDate,
} from '@/components';
import ModalContinueCreate from '@/components/ModalContinueCreate/ModalContinueCreate';
import { ajajaToast } from '@/components/Toaster/customToast';
import { SESSION_STORAGE_KEY } from '@/constants';
import { STEP_NAME } from '@/constants/createPlanStepTitle';
import { SESSION_STORAGE_KEY, STEP_NAME } from '@/constants';
import { canMakeNewPlanStore } from '@/stores/canMakeNewPlanStore';
import { RemindItemType, RemindOptionType } from '@/types/Remind';
import { RemindItemType, RemindOptionType } from '@/types';
import { decideRemindDate } from '@/utils/decideRemindDate';
import { getSessionStorageData } from '@/utils/getSessionStorageData';
import classNames from 'classnames';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SESSION_STORAGE_KEY } from '@/constants';
import { RemindData } from '@/types/Remind';
import { RemindData } from '@/types';
import { changeRemindTimeToNumber } from '@/utils/changeRemindTimeToNumber';
import { useState } from 'react';

Expand Down
4 changes: 2 additions & 2 deletions src/app/(header)/reminds/edit/[planId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { ajajaToast } from '@/components/Toaster/customToast';
import { EDIT_REMIND_STEP_TITLE, SESSION_STORAGE_KEY } from '@/constants';
import { useEditRemindMutation } from '@/hooks/apis/useEditRemindMutation';
import { useGetRemindQuery } from '@/hooks/apis/useGetRemindQuery';
import { RemindItemType, RemindOptionType } from '@/types/Remind';
import { EditRemindData } from '@/types/apis/plan/EditRemind';
import { RemindItemType, RemindOptionType } from '@/types';
import { EditRemindData } from '@/types/apis';
import { changeRemindTimeToString } from '@/utils/changeRemindTimeToString';
import { checkIsSeason } from '@/utils/checkIsSeason';
import { decideRemindDate } from '@/utils/decideRemindDate';
Expand Down
6 changes: 3 additions & 3 deletions src/components/CreatePlanContent/CreatePlanContent.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use client';

import { HelpButton } from '@/components';
import { INPUT_MAX_LENGTH, SESSION_STORAGE_KEY } from '@/constants';
import { PlanContentType } from '@/types/Plan';
import { useSessionStorage } from '@/hooks/useSessionStorage';
import { PlanContentType } from '@/types';
import classNames from 'classnames';
import { useEffect, useRef } from 'react';
import { DeletableTag, IconSwitchButton, PlanInput, TagInput } from '..';
import HelpButton from '../HelpButton/HelpButton';
import { useSessionStorage } from './../../hooks/useSessionStorage';
import './index.scss';

interface CreatePlanContentProps {
Expand Down
4 changes: 2 additions & 2 deletions src/components/CreatePlanIcon/CreatePlanIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use client';

import { CreatePlanIconExample, Modal, ModalSelectIcon } from '@/components';
import { SESSION_STORAGE_KEY, planIcons } from '@/constants';
import { useSessionStorage } from '@/hooks/useSessionStorage';
import classNames from 'classnames';
import Image from 'next/image';
import { useEffect, useState } from 'react';
import { CreatePlanIconExample, Modal, ModalSelectIcon } from '..';
import { useSessionStorage } from './../../hooks/useSessionStorage';
import './index.scss';

interface CreatePlanIconProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
TOTAL_PERIOD_OPTIONS,
} from '@/constants';
import { useSessionStorage } from '@/hooks/useSessionStorage';
import { RemindOptionType } from '@/types/Remind';
import { RemindOptionType } from '@/types';
import classNames from 'classnames';
import React, { useCallback, useEffect, useMemo } from 'react';
import './index.scss';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
'use client';

import { ModalSendRemindExample, WritableRemindItem } from '@/components';
import { SESSION_STORAGE_KEY } from '@/constants';
import { useSessionStorage } from '@/hooks/useSessionStorage';
import { RemindItemType } from '@/types/Remind';
import { RemindItemType } from '@/types';
import classNames from 'classnames';
import React, { useCallback, useEffect, useState } from 'react';
import { WritableRemindItem } from '..';
import ModalSendRemindExample from '../ModalSendRemindExample/ModalSendRemindExample';
import './index.scss';

interface CreatePlanRemindMessageProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ModalContinueCreate/ModalContinueCreate.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use client';

import { Button, Modal } from '@/components';
import { useModalClose } from '@/hooks/useModalClose';
import classNames from 'classnames';
import React, { useRef } from 'react';
import { Button, Modal } from '..';
import './index.scss';

interface ModalContinueCreateProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ModalFixRemindDate/ModalFixRemindDate.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Modal, ModalBasic } from '@/components';
import classNames from 'classnames';
import React from 'react';
import { Modal, ModalBasic } from '..';
import './index.scss';

interface ModalFixRemindDateProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ModalSelectIcon/ModalSelectIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { planIcons } from '@/constants/planIcons';
import { planIcons } from '@/constants';
import { useModalClose } from '@/hooks/useModalClose';
import classNames from 'classnames';
import Image from 'next/image';
Expand Down
15 changes: 10 additions & 5 deletions src/components/ReadOnlyPlan/ReadOnlyPlan.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { planIcons } from '@/constants/planIcons';
import {
AjajaButton,
DebounceSwitchButton,
HelpButton,
PlanInput,
Tag,
} from '@/components';
import { ajajaToast } from '@/components/Toaster/customToast';
import { planIcons } from '@/constants';
import { useToggleAjajaNotificationMutation } from '@/hooks/apis/useToggleAjajaNotificationMutation';
import { useToggleIsPublicMutation } from '@/hooks/apis/useToggleIsPublicMutation';
import { PlanData } from '@/types/apis/plan/GetPlan';
import { PlanData } from '@/types/apis';
import Image from 'next/image';
import { AjajaButton, DebounceSwitchButton, PlanInput, Tag } from '..';
import HelpButton from '../HelpButton/HelpButton';
import { ajajaToast } from '../Toaster/customToast';
import './index.scss';

interface ReadOnlyPlanProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Icon, RemindInput } from '@/components';
import { ReadOnlyRemindItemData } from '@/types/Remind';
import { ReadOnlyRemindItemData } from '@/types';
import { checkIsSeason } from '@/utils/checkIsSeason';
import classNames from 'classnames';
import React, { useMemo, useState } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Icon, Modal, ModalBasic, RemindInput } from '@/components';
import { INPUT_MAX_LENGTH } from '@/constants/userInputMaxLength';
import { INPUT_MAX_LENGTH } from '@/constants';
import classNames from 'classnames';
import React, { useEffect, useMemo, useState } from 'react';
import './index.scss';
Expand Down
20 changes: 20 additions & 0 deletions src/hooks/apis/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export { useAllPlansQuery } from '@/hooks/apis/useAllPlansQuery';
export { useDeletePlanMutation } from '@/hooks/apis/useDeletePlanMutation';
export { useEditPlanMutation } from '@/hooks/apis/useEditPlanMutation';
export { useEditRemindMutation } from '@/hooks/apis/useEditRemindMutation';
export { useGetFeedbacksQuery } from '@/hooks/apis/useGetFeedbacksQuery';
export { useGetMyPlansQuery } from '@/hooks/apis/useGetMyPlansQuery';
export { useGetPlanQuery } from '@/hooks/apis/useGetPlanQuery';
export { useGetRemindQuery } from '@/hooks/apis/useGetRemindQuery';
export { useGetUserInformationQuery } from '@/hooks/apis/useGetUserInformationQuery';
export { usePostAjajaMutation } from '@/hooks/apis/usePostAjajaMutation';
export { usePostFeedbacksMutation } from '@/hooks/apis/usePostFeedbacksMutation';
export { usePostNewPlanMutation } from '@/hooks/apis/usePostNewPlanMutation';
export { usePostRemindTest } from '@/hooks/apis/usePostRemindTest';
export { usePostSendVerificationMutation } from '@/hooks/apis/usePostSendVerificationMutation';
export { usePostVerifyMutation } from '@/hooks/apis/usePostVerifyMutation';
export { usePutUserReceiveMutation } from '@/hooks/apis/usePutUserReceiveMutation';
export { usePostUsersRefreshMutation } from '@/hooks/apis/useRefreshNicknameMutation';
export { useToggleAjajaNotificationMutation } from '@/hooks/apis/useToggleAjajaNotificationMutation';
export { useToggleIsPublicMutation } from '@/hooks/apis/useToggleIsPublicMutation';
export { useToggleIsRemindableMutation } from '@/hooks/apis/useToggleIsRemindable';
6 changes: 6 additions & 0 deletions src/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export { useDebounce } from '@/hooks/useDebounce';
export { useIsLogIn } from '@/hooks/useIsLogIn';
export { useModalClose } from '@/hooks/useModalClose';
export { useSessionStorage } from '@/hooks/useSessionStorage';
export { useThrottle } from '@/hooks/useThrottle';
export { useWritablePlan } from '@/hooks/useWritablePlan';
3 changes: 0 additions & 3 deletions src/utils/decideRandomIconNumber.ts

This file was deleted.

10 changes: 10 additions & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export { checkIsMyPlan } from '@/utils/checkIsMyPlan';
export { checkIsSeason } from '@/utils/checkIsSeason';
export { checkIsTokenExpired } from '@/utils/checkIsTokenExpired';
export { checkThisYear } from '@/utils/checkThisYear';
export { clearCreatePlanSessionData } from '@/utils/clearCreatePlanSessionData';
export { currentMonth } from '@/utils/currentMonth';
export { decideRemindDate } from '@/utils/decideRemindDate';
export { decodeJWT } from '@/utils/decodeJWT';
export { getSessionStorageData } from '@/utils/getSessionStorageData';
export { getUserIdFromJWT } from '@/utils/getUserIdFromJWT';

0 comments on commit 0ca4763

Please sign in to comment.