Skip to content

Commit

Permalink
refactor: 전체 경로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobbymin committed Jul 30, 2024
1 parent ba6d375 commit 770d16c
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from '@emotion/styled';
import { Container } from '@/components/common/layouts/Container';
import { useCurrentCategory } from '@/hooks/useCurrentCategory';
import { breakpoints } from '@/styles/variants';
import type { CategoryData } from '@/types';
import type { CategoryData } from '@/types/categories';

type Props = {
categoryId: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from '@emotion/styled';
import { Link } from 'react-router-dom';

import { useGetProducts } from '@/api/hooks/useGetProducts';
import { useGetProducts } from '@/api/hooks/product/product.api';
import { DefaultGoodsItems } from '@/components/common/GoodsItem/Default';
import { Container } from '@/components/common/layouts/Container';
import { Grid } from '@/components/common/layouts/Grid';
Expand Down
4 changes: 2 additions & 2 deletions src/components/features/Goods/Detail/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Divider } from '@chakra-ui/react';
import styled from '@emotion/styled';

import type { ProductDetailRequestParams } from '@/api/hooks/useGetProductDetail';
import { useGetProductDetail } from '@/api/hooks/useGetProductDetail';
import { useGetProductDetail } from '@/api/hooks/product/product-detail.api';
import type { ProductDetailRequestParams } from '@/api/hooks/product/type';
import { breakpoints } from '@/styles/variants';

type Props = ProductDetailRequestParams;
Expand Down
8 changes: 3 additions & 5 deletions src/components/features/Goods/Detail/OptionSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import styled from '@emotion/styled';
import { useMemo, useState } from 'react';
import { useNavigate } from 'react-router-dom';

import {
type ProductDetailRequestParams,
useGetProductDetail,
} from '@/api/hooks/useGetProductDetail';
import { useGetProductOptions } from '@/api/hooks/useGetProductOptions';
import { useGetProductDetail } from '@/api/hooks/product/product-detail.api';
import { useGetProductOptions } from '@/api/hooks/product/product-options.api';
import type { ProductDetailRequestParams } from '@/api/hooks/product/type';
import { Button } from '@/components/common/Button';
import { useAuth } from '@/provider/Auth';
import { getDynamicPath, RouterPath } from '@/routes/path';
Expand Down
2 changes: 1 addition & 1 deletion src/components/features/Goods/Detail/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from '@emotion/styled';

import type { ProductDetailRequestParams } from '@/api/hooks/useGetProductDetail';
import type { ProductDetailRequestParams } from '@/api/hooks/product/type';
import { breakpoints } from '@/styles/variants';

import { GoodsDetailHeader } from './Header';
Expand Down
2 changes: 1 addition & 1 deletion src/components/features/Home/CategorySection/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from '@emotion/styled';
import { Link } from 'react-router-dom';

import { useGetCategories } from '@/api/hooks/useGetCategorys';
import { useGetCategories } from '@/api/hooks/categories/categories.api';
import { Container } from '@/components/common/layouts/Container';
import { Grid } from '@/components/common/layouts/Grid';
import { getDynamicPath } from '@/routes/path';
Expand Down
4 changes: 2 additions & 2 deletions src/components/features/MyAccount/WishList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
VStack,
} from '@chakra-ui/react';

import { useDeleteWishList } from '@/api/hooks/useDeleteWishList';
import { useGetWishList } from '@/api/hooks/useFindWishList';
import { useDeleteWishList } from '@/api/hooks/wish-list/wish-list-delete.api';
import { useGetWishList } from '@/api/hooks/wish-list/wish-list-find.api';
import { queryClient } from '@/api/instance';

const WishList = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/features/Order/OrderForm/GoodsInfo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import styled from '@emotion/styled';

import { useGetProductDetail } from '@/api/hooks/useGetProductDetail';
import { useGetProductDetail } from '@/api/hooks/product/product-detail.api';
import { Image } from '@/components/common/Image';
import { Spacing } from '@/components/common/layouts/Spacing';
import type { OrderHistory } from '@/types';
import type { OrderHistory } from '@/types/order';

import { LabelText } from '../Common/LabelText';

Expand Down
4 changes: 2 additions & 2 deletions src/components/features/Order/OrderForm/OrderInfo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Divider } from '@chakra-ui/react';
import styled from '@emotion/styled';

import { useGetProductDetail } from '@/api/hooks/useGetProductDetail';
import { useGetProductDetail } from '@/api/hooks/product/product-detail.api';
import { Button } from '@/components/common/Button';
import { Spacing } from '@/components/common/layouts/Spacing';
import type { OrderHistory } from '@/types';
import type { OrderHistory } from '@/types/order';

import { HeadingText } from '../Common/HeadingText';
import { LabelText } from '../Common/LabelText';
Expand Down
2 changes: 1 addition & 1 deletion src/components/features/Order/OrderForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FormProvider, useForm } from 'react-hook-form';

import { Spacing } from '@/components/common/layouts/Spacing';
import { SplitLayout } from '@/components/common/layouts/SplitLayout';
import type { OrderFormData, OrderHistory } from '@/types';
import type { OrderFormData, OrderHistory } from '@/types/order';

import { HEADER_HEIGHT } from '../../Layout/Header';
import { GoodsInfo } from './GoodsInfo';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useCurrentCategory.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMemo } from 'react';

import { useGetCategories } from '@/api/hooks/useGetCategorys';
import { useGetCategories } from '@/api/hooks/categories/categories.api';
import { getCurrentCategory } from '@/components/features/Category/CategoryHeroSection';

type Props = { categoryId: string };
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useHandleOrderHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';

import { RouterPath } from '@/routes/path';
import type { OrderHistory } from '@/types';
import type { OrderHistory } from '@/types/order';
import { orderHistorySessionStorage } from '@/utils/storage';

export const useHandleOrderHistory = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useOrderFormContext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useFormContext } from 'react-hook-form';

import type { OrderFormData } from '@/types';
import type { OrderFormData } from '@/types/order';

export const useOrderFormContext = useFormContext<OrderFormData>;
2 changes: 1 addition & 1 deletion src/pages/Goods/Detail/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useParams } from 'react-router-dom';

import type { ProductDetailRequestParams } from '@/api/hooks/useGetProductDetail';
import type { ProductDetailRequestParams } from '@/api/hooks/product/type';
import { AsyncBoundary } from '@/components/common/AsyncBoundary';
import { SplitLayout } from '@/components/common/layouts/SplitLayout';
import { LoadingView } from '@/components/common/View/LoadingView';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from '@emotion/styled';
import { useState } from 'react';
import { Link, useSearchParams } from 'react-router-dom';

import { useLogin } from '@/api/hooks/useGetLogin';
import { useLogin } from '@/api/hooks/auth/login.api';
import KAKAO_LOGO from '@/assets/kakao_logo.svg';
import { Button } from '@/components/common/Button';
import { UnderlineTextField } from '@/components/common/Form/Input/UnderlineTextField';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Register/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from '@emotion/styled';
import { useState } from 'react';
import { Link, useSearchParams } from 'react-router-dom';

import { useRegister } from '@/api/hooks/useGetRegister';
import { useRegister } from '@/api/hooks/auth/register.api';
import KAKAO_LOGO from '@/assets/kakao_logo.svg';
import { Button } from '@/components/common/Button';
import { UnderlineTextField } from '@/components/common/Form/Input/UnderlineTextField';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/storage/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { OrderHistory } from '@/types';
import type { OrderHistory } from '@/types/order';

const initStorage = <T extends keyof StorageKey>(key: T, storage: Storage) => {
const storageKey = `${key}`;
Expand Down

0 comments on commit 770d16c

Please sign in to comment.