File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import React , { useCallback , useEffect } from 'react' ;
1+ import React , { useEffect } from 'react' ;
22import { useDispatch , useSelector } from 'react-redux' ;
33import { Avatar , Card } from 'antd' ;
44import { END } from 'redux-saga' ;
@@ -39,17 +39,19 @@ const User = () => {
3939
4040 return (
4141 < AppLayout >
42- < Head >
43- < title >
44- { userInfo . nickname }
45- 님의 글
46- </ title >
47- < meta name = "description" content = { `${ userInfo . nickname } 님의 게시글` } />
48- < meta property = "og:title" content = { `${ userInfo . nickname } 님의 게시글` } />
49- < meta property = "og:description" content = { `${ userInfo . nickname } 님의 게시글` } />
50- < meta property = "og:image" content = "https://nodebird.com/favicon.ico" />
51- < meta property = "og:url" content = { `https://nodebird.com/user/${ id } ` } />
52- </ Head >
42+ { userInfo && (
43+ < Head >
44+ < title >
45+ { userInfo . nickname }
46+ 님의 글
47+ </ title >
48+ < meta name = "description" content = { `${ userInfo . nickname } 님의 게시글` } />
49+ < meta property = "og:title" content = { `${ userInfo . nickname } 님의 게시글` } />
50+ < meta property = "og:description" content = { `${ userInfo . nickname } 님의 게시글` } />
51+ < meta property = "og:image" content = "https://nodebird.com/favicon.ico" />
52+ < meta property = "og:url" content = { `https://nodebird.com/user/${ id } ` } />
53+ </ Head >
54+ ) }
5355 { userInfo
5456 ? (
5557 < Card
@@ -78,9 +80,7 @@ const User = () => {
7880 </ Card >
7981 )
8082 : null }
81- { mainPosts . map ( ( c ) => (
82- < PostCard key = { c . id } post = { c } />
83- ) ) }
83+ { mainPosts . map ( ( post ) => < PostCard key = { post . id } post = { post } /> ) }
8484 </ AppLayout >
8585 ) ;
8686} ;
Original file line number Diff line number Diff line change @@ -39,17 +39,19 @@ const User = () => {
3939
4040 return (
4141 < AppLayout >
42- < Head >
43- < title >
44- { userInfo . nickname }
45- 님의 글
46- </ title >
47- < meta name = "description" content = { `${ userInfo . nickname } 님의 게시글` } />
48- < meta property = "og:title" content = { `${ userInfo . nickname } 님의 게시글` } />
49- < meta property = "og:description" content = { `${ userInfo . nickname } 님의 게시글` } />
50- < meta property = "og:image" content = "https://nodebird.com/favicon.ico" />
51- < meta property = "og:url" content = { `https://nodebird.com/user/${ id } ` } />
52- </ Head >
42+ { userInfo && (
43+ < Head >
44+ < title >
45+ { userInfo . nickname }
46+ 님의 글
47+ </ title >
48+ < meta name = "description" content = { `${ userInfo . nickname } 님의 게시글` } />
49+ < meta property = "og:title" content = { `${ userInfo . nickname } 님의 게시글` } />
50+ < meta property = "og:description" content = { `${ userInfo . nickname } 님의 게시글` } />
51+ < meta property = "og:image" content = "https://nodebird.com/favicon.ico" />
52+ < meta property = "og:url" content = { `https://nodebird.com/user/${ id } ` } />
53+ </ Head >
54+ ) }
5355 { userInfo && ( userInfo . id !== me ?. id )
5456 ? (
5557 < Card
You can’t perform that action at this time.
0 commit comments