mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add skeleton on Domain Finder page
This commit is contained in:
@@ -1,7 +1,25 @@
|
||||
import React from "react";
|
||||
import React, {useEffect, useState} from "react";
|
||||
import {Card, Flex, Skeleton, Typography} from "antd";
|
||||
import {getUser, User} from "../../utils/api";
|
||||
|
||||
export default function UserPage() {
|
||||
return <p>
|
||||
My Account Page
|
||||
</p>
|
||||
|
||||
const [user, setUser] = useState<User | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
getUser().then(setUser)
|
||||
}, [])
|
||||
|
||||
return <Skeleton loading={user === null} active>
|
||||
<Flex gap="middle" align="center" justify="center" vertical>
|
||||
<Card title="My Account">
|
||||
<Typography.Paragraph>
|
||||
Username : {user?.email}
|
||||
</Typography.Paragraph>
|
||||
<Typography.Paragraph>
|
||||
Roles : {user?.roles.join(',')}
|
||||
</Typography.Paragraph>
|
||||
</Card>
|
||||
</Flex>
|
||||
</Skeleton>
|
||||
}
|
||||
Reference in New Issue
Block a user