aboutsummaryrefslogtreecommitdiff
path: root/src/Pages/ProfilePage/ProfilePage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Pages/ProfilePage/ProfilePage.tsx')
-rw-r--r--src/Pages/ProfilePage/ProfilePage.tsx30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Pages/ProfilePage/ProfilePage.tsx b/src/Pages/ProfilePage/ProfilePage.tsx
new file mode 100644
index 0000000..8d082dc
--- /dev/null
+++ b/src/Pages/ProfilePage/ProfilePage.tsx
@@ -0,0 +1,30 @@
+import React, {useState} from 'react';
+import {makeStyles} from '@material-ui/core/styles';
+import {User} from '../../types';
+import SignInForm from "./SignInForm";
+import ProfileInfo from "./ProfileInfo";
+
+interface PropTypes {
+ id: string;
+ setUser: (newUser: User | undefined) => void;
+ user: User | undefined;
+}
+
+const useStyles = makeStyles({
+
+});
+
+const ProfilePage: React.FC<PropTypes> = ({id, setUser, user}) => {
+ const classes = useStyles();
+
+ return (
+ user ? (
+ <>
+ <ProfileInfo id={user?._id || ''} setUser={setUser} />
+ </>
+ )
+ : <SignInForm setUser={setUser} />
+ )
+};
+
+export default ProfilePage;