diff options
Diffstat (limited to 'src/pages/ProfilePage/ProfilePage.tsx')
-rw-r--r-- | src/pages/ProfilePage/ProfilePage.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pages/ProfilePage/ProfilePage.tsx b/src/pages/ProfilePage/ProfilePage.tsx index 3506995..b2ca0a0 100644 --- a/src/pages/ProfilePage/ProfilePage.tsx +++ b/src/pages/ProfilePage/ProfilePage.tsx @@ -9,9 +9,10 @@ interface PropTypes { logOut: () => void; navigate: (prefix: string, id: string) => void; id: string; + setUser:(a:User)=>void; } -const ProfilePage: React.FC<PropTypes> = ({ logOut, id, navigate }) => { +const ProfilePage: React.FC<PropTypes> = ({ logOut, id, navigate,setUser }) => { const [userInfo, setUserInfo] = useState<User>(); const [polls, setPolls] = useState<Poll[]>([]); const [totalVotes, setTotalVotes] = useState<number>(0); @@ -39,7 +40,7 @@ const ProfilePage: React.FC<PropTypes> = ({ logOut, id, navigate }) => { return ( <> - <ProfileInfo user={userInfo} logOut={logOut} savedPolls={polls.length} totalVotes={totalVotes}/> + <ProfileInfo user={userInfo} setUserInfo={setUserInfo} setUser={setUser} logOut={logOut} savedPolls={polls.length} totalVotes={totalVotes}/> <Feed polls={polls} navigate={navigate} /> </> ); |