mirror of
https://github.com/supabase/supabase.git
synced 2026-07-04 14:34:21 +08:00
33 lines
868 B
JavaScript
33 lines
868 B
JavaScript
import React from 'react'
|
|
import { useUser, RequireAuth } from '../hooks/authUser'
|
|
|
|
import { Card, Typography, Space } from '@supabase/ui'
|
|
import Header from '../components/Header'
|
|
|
|
export default function Profile() {
|
|
RequireAuth()
|
|
|
|
const { user } = useUser()
|
|
|
|
return (
|
|
<>
|
|
<Header />
|
|
{user && (
|
|
<div style={{ maxWidth: '620px', margin: '96px auto' }}>
|
|
<Card>
|
|
<Space direction="vertical" size={6}>
|
|
<Typography.Text>you're signed in</Typography.Text>
|
|
<Typography.Text strong>Email: {user.email}</Typography.Text>
|
|
<Typography.Text type="success">User data:</Typography.Text>
|
|
|
|
<Typography.Text>
|
|
<pre>{JSON.stringify(user, null, 2)}</pre>
|
|
</Typography.Text>
|
|
</Space>
|
|
</Card>
|
|
</div>
|
|
)}
|
|
</>
|
|
)
|
|
}
|