20 lines
611 B
TypeScript
20 lines
611 B
TypeScript
|
|
import useAuthContext from '@/components/ui/auth-provider/hook';
|
|
import { Button, ButtonText } from '@/components/ui/button';
|
|
import Content from '@/components/ui/content';
|
|
import { Divider } from '@/components/ui/divider';
|
|
import UserHeader from '@/components/user-header';
|
|
|
|
export default function MeScreen() {
|
|
const { user, logout, isAuthorized } = useAuthContext();
|
|
|
|
return (
|
|
<Content>
|
|
<UserHeader user={user} />
|
|
|
|
<Divider className='mt-3 mb-3' />
|
|
|
|
{isAuthorized && <Button action="negative" onPress={() => logout()}><ButtonText>Logout</ButtonText></Button>}
|
|
</Content>
|
|
);
|
|
} |