diff --git a/client/src/App.tsx b/client/src/App.tsx index 142ffe68..f61c9eee 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,9 +1,9 @@ +import { useRefreshQuery } from "@apis/auth"; +import { useErrorStore } from "@stores/useErrorStore"; +import { useUserInfo } from "@stores/useUserStore"; import { useEffect } from "react"; +import { ErrorModal } from "@components/modal/ErrorModal"; import { WorkSpace } from "@features/workSpace/WorkSpace"; -import { useRefreshQuery } from "./apis/auth"; -import { ErrorModal } from "./components/modal/ErrorModal"; -import { useErrorStore } from "./stores/useErrorStore"; -import { useUserInfo } from "./stores/useUserStore"; const App = () => { const { id, name, accessToken } = useUserInfo(); diff --git a/client/src/apis/auth.ts b/client/src/apis/auth.ts index 90d777a2..ee82d484 100644 --- a/client/src/apis/auth.ts +++ b/client/src/apis/auth.ts @@ -1,5 +1,5 @@ +import { useUserActions } from "@stores/useUserStore"; import { useMutation, useQuery } from "@tanstack/react-query"; -import { useUserActions } from "@src/stores/useUserStore"; import { unAuthorizationFetch, fetch } from "./axios"; const authKey = { diff --git a/client/src/apis/axios.ts b/client/src/apis/axios.ts index 31145806..7a369826 100644 --- a/client/src/apis/axios.ts +++ b/client/src/apis/axios.ts @@ -1,6 +1,6 @@ +import { useErrorStore } from "@stores/useErrorStore"; +import { useUserStore } from "@stores/useUserStore"; import axios, { AxiosError, CreateAxiosDefaults, InternalAxiosRequestConfig } from "axios"; -import { useErrorStore } from "@src/stores/useErrorStore"; -import { useUserStore } from "@src/stores/useUserStore"; interface CustomAxiosRequestConfig extends InternalAxiosRequestConfig { _retry?: boolean; diff --git a/client/src/components/sidebar/MenuButton.tsx b/client/src/components/sidebar/MenuButton.tsx index e7f2fb1a..73f0e774 100644 --- a/client/src/components/sidebar/MenuButton.tsx +++ b/client/src/components/sidebar/MenuButton.tsx @@ -1,4 +1,4 @@ -import { useUserInfo } from "@src/stores/useUserStore"; +import { useUserInfo } from "@stores/useUserStore"; import { menuItemWrapper, imageBox, textBox } from "./MenuButton.style"; export const MenuButton = () => { diff --git a/client/src/components/sidebar/Sidebar.tsx b/client/src/components/sidebar/Sidebar.tsx index 6d6cef8e..515de198 100644 --- a/client/src/components/sidebar/Sidebar.tsx +++ b/client/src/components/sidebar/Sidebar.tsx @@ -1,10 +1,10 @@ +import { useIsSidebarOpen, useSidebarActions } from "@stores/useSidebarStore"; import { motion } from "framer-motion"; import { IconButton } from "@components/button/IconButton"; import { Modal } from "@components/modal/modal"; import { useModal } from "@components/modal/useModal"; import { MAX_VISIBLE_PAGE } from "@src/constants/page"; import { AuthButton } from "@src/features/auth/AuthButton"; -import { useIsSidebarOpen, useSidebarActions } from "@src/stores/useSidebarStore"; import { Page } from "@src/types/page"; import { MenuButton } from "./MenuButton"; import { PageItem } from "./PageItem"; diff --git a/client/src/features/auth/AuthButton.tsx b/client/src/features/auth/AuthButton.tsx index a2cc08b4..82dbffea 100644 --- a/client/src/features/auth/AuthButton.tsx +++ b/client/src/features/auth/AuthButton.tsx @@ -1,8 +1,8 @@ -import { useLogoutMutation } from "@src/apis/auth"; -import { TextButton } from "@src/components/button/textButton"; -import { Modal } from "@src/components/modal/modal"; -import { useModal } from "@src/components/modal/useModal"; -import { useCheckLogin } from "@src/stores/useUserStore"; +import { useLogoutMutation } from "@apis/auth"; +import { useCheckLogin } from "@stores/useUserStore"; +import { TextButton } from "@components/button/textButton"; +import { Modal } from "@components/modal/modal"; +import { useModal } from "@components/modal/useModal"; import { AuthModal } from "./AuthModal"; export const AuthButton = () => { diff --git a/client/src/features/auth/AuthModal.tsx b/client/src/features/auth/AuthModal.tsx index 52668cd8..4c702ffe 100644 --- a/client/src/features/auth/AuthModal.tsx +++ b/client/src/features/auth/AuthModal.tsx @@ -1,11 +1,11 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ +import { useLoginMutation, useSignupMutation } from "@apis/auth"; import { useState } from "react"; import Lock from "@assets/icons/lock.svg?react"; import Mail from "@assets/icons/mail.svg?react"; import User from "@assets/icons/user.svg?react"; +import { InputField } from "@components/inputField/InputField"; import { Modal } from "@components/modal/modal"; -import { useLoginMutation, useSignupMutation } from "@src/apis/auth"; -import { InputField } from "@src/components/inputField/InputField"; import { container, formContainer, title, toggleButton } from "./AuthModal.style"; interface AuthModalProps { diff --git a/client/src/features/editor/Editor.tsx b/client/src/features/editor/Editor.tsx index f121ba05..33717191 100644 --- a/client/src/features/editor/Editor.tsx +++ b/client/src/features/editor/Editor.tsx @@ -1,3 +1,4 @@ +import { useSocket } from "@apis/useSocket.ts"; import { DndContext } from "@dnd-kit/core"; import { SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable"; import { EditorCRDT } from "@noctaCrdt/Crdt"; @@ -6,7 +7,6 @@ import { Block as CRDTBlock } from "@noctaCrdt/Node"; import { BlockId } from "@noctaCrdt/NodeId"; import { RemoteCharInsertOperation } from "node_modules/@noctaCrdt/Interfaces.ts"; import { useRef, useState, useCallback, useEffect } from "react"; -import { useSocket } from "@src/apis/useSocket.ts"; import { editorContainer, editorTitleContainer, editorTitle } from "./Editor.style"; import { Block } from "./components/block/Block.tsx"; import { useBlockDragAndDrop } from "./hooks/useBlockDragAndDrop"; diff --git a/client/src/features/page/hooks/usePage.ts b/client/src/features/page/hooks/usePage.ts index 618edd2c..61cbf7b5 100644 --- a/client/src/features/page/hooks/usePage.ts +++ b/client/src/features/page/hooks/usePage.ts @@ -1,7 +1,7 @@ import { useEffect, useState } from "react"; import { PAGE, SIDE_BAR } from "@constants/size"; import { SPACING } from "@constants/spacing"; -import { useIsSidebarOpen } from "@src/stores/useSidebarStore"; +import { useIsSidebarOpen } from "@stores/useSidebarStore"; import { Position, Size } from "@src/types/page"; const PADDING = SPACING.MEDIUM * 2; diff --git a/client/tsconfig.json b/client/tsconfig.json index 1ed5bc84..35c75b46 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -28,6 +28,8 @@ "@constants/*": ["src/constants/*"], "@hooks/*": ["src/hooks/*"], "@utils/*": ["src/utils/*"], + "@apis/*": ["src/apis/*"], + "@stores/*": ["src/stores/*"], "@noctaCrdt": ["../@noctaCrdt/dist"], "@noctaCrdt/*": ["../@noctaCrdt/dist/*"] }