File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ const UserPage = () => {
2424 const { currentUser } = useUserContext ( ) ;
2525 const [ user , setUser ] = useState ( initialUserData . currentUser ) ;
2626 const [ userLevel , setUserLevel ] = useState ( { } ) ;
27- const [ userPosts , setUserPosts ] = useState ( [ ] ) ;
2827 const [ userLikePosts , setUserLikePosts ] = useState ( [ ] ) ;
2928
3029 const [ currentTab , setCurrentTab ] = useState ( USER_POSTS ) ;
@@ -39,7 +38,6 @@ const UserPage = () => {
3938 setUser ( data ) ;
4039 const { posts, comments, followers } = data ;
4140 const { level } = getUserLevel ( { posts, comments, followers } ) ;
42- setUserPosts ( posts ) ;
4341 setUserLevel ( level ) ;
4442 }
4543 } , [ pageUserId ] ) ;
@@ -76,7 +74,7 @@ const UserPage = () => {
7674 } }
7775 index = { USER_POSTS }
7876 >
79- < PostImageContainer posts = { userPosts } />
77+ < PostImageContainer posts = { user . posts } />
8078 </ Tab . Item >
8179 < Tab . Item
8280 icon = { {
You can’t perform that action at this time.
0 commit comments