mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-22 12:10:11 +09:00
Fix title during page loading
This commit is contained in:
parent
2b6ca4354d
commit
5276456ac2
@ -15,10 +15,9 @@ export default function UUID() {
|
||||
const router = useRouter()
|
||||
const { uuid } = router.query
|
||||
const { data, error } = useSwr(
|
||||
router.query.id ? `/api/user/${router.query.id}` : null,
|
||||
uuid ? `/api/PlayerName/${uuid}` : null,
|
||||
fetcher
|
||||
)
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
<>
|
||||
@ -27,8 +26,7 @@ export default function UUID() {
|
||||
</Layout>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!data) {
|
||||
return (
|
||||
<>
|
||||
@ -37,13 +35,14 @@ export default function UUID() {
|
||||
</Layout>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
<Layout title={<PlayerName uuid={uuid.uuid} /> + " - " + "プレイヤー情報"}>
|
||||
<Layout title={data.username + " - " + "プレイヤー情報"}>
|
||||
<Players uuid={uuid} />
|
||||
</Layout>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user