pref: update IP check

This commit is contained in:
thehrz 2024-08-18 23:57:19 +08:00
parent 4f75ec3b07
commit 3fa5155d24
Signed by: thehrz
GPG Key ID: C84CBCE7D5F88855

View File

@ -10,7 +10,9 @@ interface Myip {
}
export default function Home() {
const { data } = useSWR<Myip>("/api/ip/myip", fetcher)
const { data: http4 } = useSWR<Myip>("http://4.ipv6test.online/ip/myip", fetcher)
const { data: http6 } = useSWR<Myip>("http://4.ipv6test.online/ip/myip", fetcher)
return (
<div className='max-w-full flex justify-center h-full'>
@ -20,8 +22,8 @@ export default function Home() {
<div className='card bg-base-100 w-96 shadow-xl'>
<div className='card-body'>
<p>IPv4 {data?.address}</p>
<p>IPv6 {data?.address}</p>
<p>IPv4 {http4?.address}</p>
<p>IPv6 {http6?.address}</p>
</div>
</div>
{/* <button className='btn btn-primary'>探索更多</button> */}