File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import React from 'react';
66import { experimentPostMobileHeaderLayout } from './ExperimentPostMobileHeader.css' ;
77import { UseQueryExperimentDetailsAPIResponse } from '../../../hooks/useExperimentDetailsQuery' ;
88
9- import RightHeader from '@/components/Header/RightHeader/RightHeader' ;
9+ import RightHeaderClient from '@/components/Header/RightHeader/components/ RightHeader.client ' ;
1010import Icon from '@/components/Icon' ;
1111import { colors } from '@/styles/colors' ;
1212
@@ -40,7 +40,7 @@ const ExperimentPostMobileHeader = ({
4040 < Icon icon = "MenuDots" width = { 24 } height = { 24 } />
4141 </ button >
4242 ) : (
43- < RightHeader />
43+ < RightHeaderClient />
4444 ) }
4545 </ div >
4646 ) ;
Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
3+ import Link from 'next/link' ;
4+
5+ import { buttonContainer , loginButton } from '../../Header.css' ;
6+ import DesktopLoginHeader from './DesktopLoginHeader/DesktopLoginHeader' ;
7+ import MobileLoginHeader from './MobileLoginHeader/MobileLoginHeader' ;
8+
9+ import useUserInfo from '@/app/home/hooks/useUserInfo' ;
10+
11+ export default function RightHeaderClient ( ) {
12+ const { userInfo, isLoading, isResearcher } = useUserInfo ( ) ;
13+
14+ if ( isLoading ) return null ;
15+
16+ return (
17+ < div className = { buttonContainer } >
18+ { userInfo ? (
19+ < >
20+ < DesktopLoginHeader userInfo = { userInfo } />
21+ < MobileLoginHeader isResearcher = { isResearcher } />
22+ </ >
23+ ) : (
24+ < Link href = "/login" className = { loginButton } >
25+ 로그인
26+ </ Link >
27+ ) }
28+ </ div >
29+ ) ;
30+ }
You can’t perform that action at this time.
0 commit comments