blob: a2dd3cc90b91156bc87c8855ddeb73e377c9f4fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import React from 'react';
import { User } from '../../types';
import SignInForm from './SignInForm';
import ProfileInfo from './ProfileInfo';
interface PropTypes {
setUser: (newUser: User | undefined) => void;
user: User | undefined;
}
const ProfilePage: React.FC<PropTypes> = ({ setUser, user }) => {
return (
user ? <ProfileInfo id={user?._id || ''} setUser={setUser} />
: <SignInForm setUser={setUser} />
);
};
export default ProfilePage;
|