From e199f28a384dfd6fdf71e6ddaa21799096099cf9 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Sat, 27 Jun 2020 16:49:58 +0300
Subject: add dialog window for uploading avatar

---
 src/pages/ProfilePage/ProfilePage.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/pages/ProfilePage/ProfilePage.tsx')

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} />
     </>
   );
-- 
cgit v1.2.3

