
import useAuthContext from '@/components/providers/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>
  );
}