File tree 3 files changed +6
-5
lines changed
pages/main/Feed/FeedHeader
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ export default function Upload({
14
14
userImage,
15
15
nickname,
16
16
} : {
17
- userImage : string | undefined ;
18
- nickname : string | undefined ;
17
+ userImage : string ;
18
+ nickname : string ;
19
19
} ) {
20
20
const [ postText , setPostText ] = useState ( '' ) ;
21
21
const { mutate : postBoard , isLoading, isSuccess } = usePostBoard ( postText ) ;
Original file line number Diff line number Diff line change @@ -5,21 +5,22 @@ import Upload from './Upload';
5
5
6
6
export default function FeedHeader ( ) {
7
7
const { data } = useGetUserInfo ( ) ;
8
+ if ( ! data ) return < div > 로그인하세요</ div > ;
8
9
return (
9
10
< FlexBox
10
11
direction = "column"
11
12
align = "start"
12
13
justify = "between"
13
14
className = "w-full gap-5 "
14
15
>
15
- < Title nickname = { data ? .nickname } />
16
+ < Title nickname = { data . nickname } />
16
17
< FlexBox
17
18
direction = "column"
18
19
align = "start"
19
20
justify = "between"
20
21
className = "w-full gap-4"
21
22
>
22
- < Upload userImage = { data ? .imageUrl } nickname = { data ? .nickname } />
23
+ < Upload userImage = { data . imageUrl } nickname = { data . nickname } />
23
24
</ FlexBox >
24
25
</ FlexBox >
25
26
) ;
Original file line number Diff line number Diff line change 1
1
import Image from 'next/image' ;
2
2
3
3
interface AvatarType {
4
- image : string | undefined ;
4
+ image : string ;
5
5
name : string ;
6
6
size ?: 'small' | 'base' | 'large' | 'xl' | 'xxl' ;
7
7
}
You can’t perform that action at this time.
0 commit comments