File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
'use client' ;
2
2
3
3
import useMyProfileQuery from '@/queries/user/useMyProfileQuery' ;
4
+
4
5
import { checkAuthentication } from '@/utils/helpers' ;
5
- import { Suspense } from 'react' ;
6
- import useMounted from '@/hooks/useMounted ' ;
6
+
7
+ import SSRSafeSuspense from '@/components/SSRSafeSuspense ' ;
7
8
import BookArchiveForAuth from '@/v1/bookArchive/BookArchiveForAuth' ;
8
9
import BookArchiveForUnAuth from '@/v1/bookArchive/BookArchiveForUnAuth' ;
9
10
import TopHeader from '@/v1/base/TopHeader' ;
@@ -13,9 +14,9 @@ export default function BookArchivePage() {
13
14
< div className = "flex w-full flex-col gap-[1rem] pb-[2rem]" >
14
15
< TopHeader text = "BookArchive" />
15
16
{ /* TODO: 스켈레톤 컴포넌트로 교체 */ }
16
- < Suspense fallback = { null } >
17
+ < SSRSafeSuspense fallback = { null } >
17
18
< Contents />
18
- </ Suspense >
19
+ </ SSRSafeSuspense >
19
20
</ div >
20
21
) ;
21
22
}
@@ -25,8 +26,6 @@ const Contents = () => {
25
26
const { data : userData } = useMyProfileQuery ( {
26
27
enabled : isAuthenticated ,
27
28
} ) ;
28
- const mounted = useMounted ( ) ;
29
- if ( ! mounted ) return null ;
30
29
31
30
return isAuthenticated ? (
32
31
< BookArchiveForAuth userJobGroup = { userData . job . jobGroupName } />
You can’t perform that action at this time.
0 commit comments