diff --git a/src/AdminApp.tsx b/src/AdminApp.tsx index c07fab10..0893c274 100644 --- a/src/AdminApp.tsx +++ b/src/AdminApp.tsx @@ -1,5 +1,6 @@ import { Outlet } from 'react-router-dom'; import { ToastContainer } from 'react-toastify'; +import { Suspense } from 'react'; import { css } from '@emotion/react'; import Background from '@/components/Background'; import BackgroundImg from '@/assets/background.webp'; @@ -8,6 +9,7 @@ import ApiErrorBoundary from '@/components/ErrorBoundary/ApiErrorBoundary'; import TitleHelmet from '@/components/TitleHelmet'; import RootUnknownFallback from './components/ErrorBoundary/fallback/RootUnknownFallback'; import RootApiFallback from './components/ErrorBoundary/fallback/RootApiFallback'; +import LoadingScreen from './components/LoadingScreen'; import 'react-toastify/dist/ReactToastify.css'; const AdminApp = () => { @@ -17,7 +19,9 @@ const AdminApp = () => { - + }> + + { @@ -20,7 +22,9 @@ const App = () => {
- + }> + +
); }; diff --git a/src/pages/AdminMainPage/tabs/UserTab.tsx b/src/pages/AdminMainPage/tabs/UserTab.tsx index 1581c5ea..07426f8a 100644 --- a/src/pages/AdminMainPage/tabs/UserTab.tsx +++ b/src/pages/AdminMainPage/tabs/UserTab.tsx @@ -1,4 +1,4 @@ -import { Suspense, useMemo, useState } from 'react'; +import { useMemo, useState } from 'react'; import Paper from '@mui/material/Paper'; import { Table, @@ -11,7 +11,6 @@ import { import Dropdown from '@/components/Dropdown'; import { Copy, MoreHorizontal, TrashCan } from '@/assets/icons'; import COLORS from '@/constants/colors'; -import LoadingSpinner from '@/components/LoadingSpinner'; import useBoolean from '@/hooks/useBoolean'; import { debounce } from '@/utils/timerUtils'; import usePagedUserQuery from '../hooks/usePagedUserQuery'; @@ -111,9 +110,7 @@ const UserTab = () => { placeholder="검색할 이메일을 입력하세요" /> - }> - - + ); }; diff --git a/src/pages/LetterReceptionPage/index.tsx b/src/pages/LetterReceptionPage/index.tsx index 1defeea6..6cde5751 100644 --- a/src/pages/LetterReceptionPage/index.tsx +++ b/src/pages/LetterReceptionPage/index.tsx @@ -1,13 +1,10 @@ import { useParams } from 'react-router-dom'; -import { Suspense } from 'react'; import { useSuspenseQuery } from '@tanstack/react-query'; -import LoadingSpinner from '@/components/LoadingSpinner'; import UnknownErrorBoundary from '@/components/ErrorBoundary/UnknownErrorBoundary'; import LetterAccessFallback from '@/components/ErrorBoundary/fallback/LetterAccessFallback'; import letterOptions from '@/api/letter/queryOptions'; import OnboardingReception from './OnboardingReception'; import NormalReception from './NormalReception'; -import style from './styles'; const SuspensedPage = () => { const { letterId } = useParams(); @@ -26,16 +23,7 @@ const SuspensedPage = () => { const LetterReceptionPage = () => { return ( - - -

흘러온 편지 가져오는 중...

- - } - > - -
+
); }; diff --git a/src/pages/LetterReplyPage/index.tsx b/src/pages/LetterReplyPage/index.tsx index 24a9a755..cbedd40b 100644 --- a/src/pages/LetterReplyPage/index.tsx +++ b/src/pages/LetterReplyPage/index.tsx @@ -1,6 +1,4 @@ -import { Suspense } from 'react'; import { useParams } from 'react-router-dom'; -import LoadingSpinner from '@/components/LoadingSpinner'; import UnknownErrorBoundary from '@/components/ErrorBoundary/UnknownErrorBoundary'; import LetterAccessFallback from '@/components/ErrorBoundary/fallback/LetterAccessFallback'; import ReplyHeader from './components/ReplyHeader'; @@ -14,25 +12,16 @@ const LetterReplyPage = () => { return ( - - -

답장 받은 편지 가져오는 중...

- - } - > -
- -
-
- - -
- +
+ +
+
+ +
+
- +
); }; diff --git a/src/pages/LetterStoragePage/index.tsx b/src/pages/LetterStoragePage/index.tsx index 14b8dae8..3da91e04 100644 --- a/src/pages/LetterStoragePage/index.tsx +++ b/src/pages/LetterStoragePage/index.tsx @@ -1,6 +1,4 @@ -import { Suspense } from 'react'; import { css } from '@emotion/react'; -import LoadingSpinner from '@/components/LoadingSpinner'; import Tabs from '@/components/Tabs'; import StorageHeader from './components/StorageHeader'; import ReplyStorage from './ReplyStorage'; @@ -17,28 +15,10 @@ const LetterStoragePage = () => { 내가 보낸 편지 - - -

보관한 편지 가져오는 중...

-
- } - > - - + - - -

내가 쓴 편지 가져오는 중...

-
- } - > - -
+ diff --git a/src/pages/MainPage/index.tsx b/src/pages/MainPage/index.tsx index c1b2b0df..093dbe41 100644 --- a/src/pages/MainPage/index.tsx +++ b/src/pages/MainPage/index.tsx @@ -1,5 +1,4 @@ import { useNavigate } from 'react-router-dom'; -import { Suspense } from 'react'; import { css } from '@emotion/react'; import IconButton from '@/components/IconButton'; import Header from '@/components/Header'; @@ -19,9 +18,7 @@ const MainPage = () => {
- }> - - + {
- {/* TODO: 로딩 처리 필요 */} - }> - - +
- }> - - +
); diff --git a/src/pages/MyPage/index.tsx b/src/pages/MyPage/index.tsx index 84529b43..6b62cc92 100644 --- a/src/pages/MyPage/index.tsx +++ b/src/pages/MyPage/index.tsx @@ -1,5 +1,4 @@ import { Link } from 'react-router-dom'; -import { Suspense } from 'react'; import { css } from '@emotion/react'; import { Switch } from '@mui/material'; import { useSuspenseQuery } from '@tanstack/react-query'; @@ -10,7 +9,6 @@ import COLORS from '@/constants/colors'; import { ROUTER_PATHS } from '@/constants/routerPaths'; import useBoolean from '@/hooks/useBoolean'; import memberOptions from '@/api/member/queryOptions'; -import LoadingSpinner from '@/components/LoadingSpinner'; import { GENDER_DICT, WORRY_DICT } from '@/constants/users'; import useMusicStore from '@/stores/useMusicStore'; import NicknameBottomSheet from './components/NicknameBottomSheet'; @@ -143,15 +141,7 @@ const MyPage = () => {

마이페이지

- - - - } - > - - +