// Base layout
import Layout from "../../components/Layout"
// React
import { useRouter } from 'next/router'
// Data fetching
import useSwr from 'swr'
const fetcher = (url) => fetch(url).then((res) => res.json())
// Components
import WrongUUID from '../../components/Minecraft/WrongUUID'
export default function UUID() {
const router = useRouter()
const { ign } = router.query
const { data, error } = useSwr(
ign ? `https://api.ashcon.app/mojang/v2/user/${ign}` : null,
fetcher
)
if (error) {
return (
<>
エラーが発生しました。 読み込み中
リダイレクトしています...
) } } } }