File tree 6 files changed +16
-42
lines changed
pages/main/Feed/FeedHeader
6 files changed +16
-42
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- export default function Title ( ) {
1
+ export default function Title ( { nickname } : { nickname : string | undefined } ) {
2
2
return (
3
3
< div className = "header1" >
4
- < span className = "text-primary-300" > 수박이 </ span > 와 좋은 하루 되세요!
4
+ < span className = "text-primary-300" > { nickname } </ span > 님 좋은 하루 되세요!
5
5
</ div >
6
6
) ;
7
7
}
Original file line number Diff line number Diff line change @@ -7,7 +7,13 @@ import Avatar from '../../../../ui/Avatar';
7
7
import Button from '../../../../ui/Button' ;
8
8
import FlexBox from '../../../../ui/FlexBox' ;
9
9
10
- export default function Upload ( ) {
10
+ export default function Upload ( {
11
+ userImage,
12
+ nickname,
13
+ } : {
14
+ userImage : string | undefined ;
15
+ nickname : string | undefined ;
16
+ } ) {
11
17
const [ postText , setPostText ] = useState ( '' ) ;
12
18
const [ isUploading , setIsUploading ] = useState ( false ) ;
13
19
@@ -47,8 +53,8 @@ export default function Upload() {
47
53
< FlexBox justify = "between" className = "w-full gap-[24px]" >
48
54
< Avatar
49
55
size = "xxl"
50
- image = "/Feed/desktop/tempUserProfilePic.svg"
51
- name = "수박이"
56
+ image = { userImage }
57
+ name = { nickname ?? '로그인하세요' }
52
58
/>
53
59
< div className = "relative w-full" >
54
60
< textarea
Original file line number Diff line number Diff line change 1
1
import FlexBox from '@/components/ui/FlexBox' ;
2
+ import useGetUserInfo from '@/hooks/queries/useGetUserInfo' ;
2
3
import Title from './Title' ;
3
- import Location from './Location' ;
4
4
import Upload from './Upload' ;
5
5
6
6
export default function FeedHeader ( ) {
7
+ const { data } = useGetUserInfo ( ) ;
7
8
return (
8
9
< FlexBox
9
10
direction = "column"
10
11
align = "start"
11
12
justify = "between"
12
13
className = "w-full gap-5 "
13
14
>
14
- < Title />
15
+ < Title nickname = { data ?. nickname } />
15
16
< FlexBox
16
17
direction = "column"
17
18
align = "start"
18
19
justify = "between"
19
20
className = "w-full gap-4"
20
21
>
21
- < Location />
22
- < Upload />
22
+ < Upload userImage = { data ?. imageUrl } nickname = { data ?. nickname } />
23
23
</ FlexBox >
24
24
</ FlexBox >
25
25
) ;
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 ;
4
+ image : string | undefined ;
5
5
name : string ;
6
6
size ?: 'small' | 'base' | 'large' | 'xl' | 'xxl' ;
7
7
}
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ export default function FeedBoardCard({
10
10
board : Board ;
11
11
setShowModal : Dispatch < SetStateAction < boolean > > ;
12
12
} ) {
13
- // const { data: commentList } = useGetShortCommentList(boardId);
14
13
return (
15
14
< FlexBox
16
15
direction = "column"
You can’t perform that action at this time.
0 commit comments