diff --git a/src/components/search/SearchListItem.tsx b/src/components/search/SearchListItem.tsx
index 19d21ebf..9b5a5f62 100644
--- a/src/components/search/SearchListItem.tsx
+++ b/src/components/search/SearchListItem.tsx
@@ -4,7 +4,7 @@ import { Align, Between } from '@/styles/layout';
import { styled } from 'styled-system/jsx';
import { cx } from 'styled-system/css';
import { useSetHistory } from '@/hooks/search/useSetHistory';
-import { memo, lazy, useState } from 'react';
+import { memo, lazy, useState, Suspense } from 'react';
const SearchMore = lazy(() => import('@/components/search/SearchMore'));
const SearchMoreList = lazy(() => import('@/components/search/SearchMoreList'));
@@ -40,9 +40,15 @@ const SearchListItem = memo(({ users, search }: SearchList) => {
))}
{users.length == 5 && !loadMore && (
-
+
+
+
+ )}
+ {loadMore && (
+
+
+
)}
- {loadMore && }
>
);
});
diff --git a/src/components/support/CustomerCenter.tsx b/src/components/support/CustomerCenter.tsx
index ebf81b74..4ea625f5 100644
--- a/src/components/support/CustomerCenter.tsx
+++ b/src/components/support/CustomerCenter.tsx
@@ -1,4 +1,4 @@
-import { lazy } from 'react';
+import { lazy, Suspense } from 'react';
import Taps from '@/components/common/Taps';
import SEOMeta from '@/components/common/SEOMeta';
import SEO_DATA from '@/constants/SEOData';
@@ -20,7 +20,8 @@ const CustomerCenter = () => {
selectedTab={seletedTap}
handleButtonClick={handleSelectTap}
/>
- {seletedTap === taps[0] ? : }
+
+ {seletedTap === taps[0] ? : }
>
);
};
diff --git a/src/components/support/FAQ.tsx b/src/components/support/FAQ.tsx
index 388eacb5..40ee94cd 100644
--- a/src/components/support/FAQ.tsx
+++ b/src/components/support/FAQ.tsx
@@ -1,4 +1,4 @@
-import { lazy } from 'react';
+import { Suspense, lazy } from 'react';
import { useQuery } from '@tanstack/react-query';
import SearchBar from '@/components/search/SearchBar';
import { getSupportList } from '@/api/support';
@@ -44,10 +44,12 @@ const FAQ = () => {
FAQList.filter((item: FAQData) =>
search ? item.title.includes(search) : item
).map((item: FAQData) => (
-
+
+
+
))}
);
diff --git a/src/hooks/profile/useGetCheckFollowing.ts b/src/hooks/profile/useGetCheckFollowing.ts
index 0153c43a..83386f90 100644
--- a/src/hooks/profile/useGetCheckFollowing.ts
+++ b/src/hooks/profile/useGetCheckFollowing.ts
@@ -1,7 +1,10 @@
import { checkFollowing } from '@/api/follow';
import { useEffect, useState } from 'react';
-const useGetCheckFollowing = (ProfileId: string | undefined) => {
+const useGetCheckFollowing = (
+ ProfileId: string | undefined,
+ signedIn: string | undefined
+) => {
const [isFollowing, setIsFollowing] = useState(true);
const getCheckFollowing = async () => {
@@ -10,7 +13,7 @@ const useGetCheckFollowing = (ProfileId: string | undefined) => {
};
useEffect(() => {
- getCheckFollowing();
+ signedIn && getCheckFollowing();
}, [isFollowing]);
return { isFollowing, getCheckFollowing };
diff --git a/src/pages/Page-Coffee.tsx b/src/pages/Page-Coffee.tsx
index 6714880e..80fea093 100644
--- a/src/pages/Page-Coffee.tsx
+++ b/src/pages/Page-Coffee.tsx
@@ -1,4 +1,4 @@
-import { lazy, useRef } from 'react';
+import { Suspense, lazy, useRef } from 'react';
import MyCalendar from '@/components/coffee/MyCalendar';
import MyCoffeeSum from '@/components/coffee/MyCoffeeSum';
import SEOMeta from '@/components/common/SEOMeta';
@@ -20,8 +20,16 @@ const Coffee = () => {
- {!signedIn && }
- {!signedIn && }
+ {!signedIn && (
+
+
+
+ )}
+ {!signedIn && (
+
+
+
+ )}
>
);
};
diff --git a/src/pages/Page-Notification.tsx b/src/pages/Page-Notification.tsx
index 21650c30..de4a8e90 100644
--- a/src/pages/Page-Notification.tsx
+++ b/src/pages/Page-Notification.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useId } from 'react';
+import React, { Suspense, useEffect, useId } from 'react';
import { useQuery } from '@tanstack/react-query';
import CTA from '@/components/common/CTA';
@@ -63,7 +63,11 @@ const Notification = () => {
)}
- {!signedIn && }
+ {!signedIn && (
+
+
+
+ )}
>
);
diff --git a/src/pages/Page-Post.tsx b/src/pages/Page-Post.tsx
index 8da4f2c4..17f36600 100644
--- a/src/pages/Page-Post.tsx
+++ b/src/pages/Page-Post.tsx
@@ -1,4 +1,4 @@
-import { lazy } from 'react';
+import { Suspense, lazy } from 'react';
import { useParams } from 'react-router-dom';
import { useComposeHeader } from '@/hooks/useComposeHeader';
@@ -45,14 +45,24 @@ const Post = () => {
return (
<>
- {register && }
+ {register && (
+
+
+
+ )}
{update && !register && (
-
+
+
+
+ )}
+ {!update && !register && postId && (
+
+
+
)}
- {!update && !register && postId && }
>
);
};
diff --git a/src/pages/Page-Posts.tsx b/src/pages/Page-Posts.tsx
index 5cfe7551..bf5e248b 100644
--- a/src/pages/Page-Posts.tsx
+++ b/src/pages/Page-Posts.tsx
@@ -1,4 +1,4 @@
-import { useState, lazy } from 'react';
+import { useState, lazy, Suspense } from 'react';
import PostTabs from '@/components/posts/PostsTabs';
import { useComposeHeader } from '@/hooks/useComposeHeader';
import { TABS_TEXTS } from '@/constants/texts';
@@ -21,8 +21,16 @@ export const Posts = () => {
/>
- {postsTab === TABS_TEXTS.trend[0] && }
- {postsTab === TABS_TEXTS.following[0] && }
+ {postsTab === TABS_TEXTS.trend[0] && (
+
+
+
+ )}
+ {postsTab === TABS_TEXTS.following[0] && (
+
+
+
+ )}
>
);
};
diff --git a/src/pages/Page-Profile.tsx b/src/pages/Page-Profile.tsx
index 735ea657..e8017555 100644
--- a/src/pages/Page-Profile.tsx
+++ b/src/pages/Page-Profile.tsx
@@ -1,4 +1,4 @@
-import { lazy } from 'react';
+import { Suspense, lazy } from 'react';
import { useRecoilValue } from 'recoil';
import { useParams } from 'react-router-dom';
@@ -35,14 +35,6 @@ const Profile = () => {
goToSignIn();
};
- const AnonymousModalCTA = isModal && !userId && (
-
- );
-
const pageData = {
...SEO_DATA.profile,
pageUrl: `${SEO_DATA.profile.pageUrl}/${profileId}`
@@ -53,14 +45,26 @@ const Profile = () => {
{!nonMembers ? (
<>
- {AnonymousModalCTA}
-
+ {isModal && !userId && (
+
+
+
+ )}
+
+
+
>
) : (
-
+
+
+
)}
>
);
diff --git a/src/pages/Page-Start.tsx b/src/pages/Page-Start.tsx
index 4296b7f1..b9609af3 100644
--- a/src/pages/Page-Start.tsx
+++ b/src/pages/Page-Start.tsx
@@ -1,4 +1,4 @@
-import { useEffect, lazy } from 'react';
+import { useEffect, lazy, Suspense } from 'react';
import { useParams } from 'react-router-dom';
import { useNavigateTo } from '@/hooks/useNavigateTo';
import { useShowFooter } from '@/hooks/useShowFooter';
@@ -33,9 +33,21 @@ const Start = () => {
<>
- {!accessToken && id === '1' && }
- {id === '2' && }
- {id === '3' && }
+ {!accessToken && id === '1' && (
+
+
+
+ )}
+ {id === '2' && (
+
+
+
+ )}
+ {id === '3' && (
+
+
+
+ )}
>
);
diff --git a/src/pages/Page-Support.tsx b/src/pages/Page-Support.tsx
index f8f168d0..c4056bd1 100644
--- a/src/pages/Page-Support.tsx
+++ b/src/pages/Page-Support.tsx
@@ -1,4 +1,4 @@
-import { lazy } from 'react';
+import { Suspense, lazy } from 'react';
import { useParams } from 'react-router-dom';
import { useComposeHeader } from '@/hooks/useComposeHeader';
import { SUPPORT_TEXTS } from '@/constants/support';
@@ -39,10 +39,26 @@ const Support = () => {
return (
<>
- {customer && }
- {notice && }
- {tos && }
- {privacy && }
+ {customer && (
+
+
+
+ )}
+ {notice && (
+
+
+
+ )}
+ {tos && (
+
+
+
+ )}
+ {privacy && (
+
+
+
+ )}
>
);
};