From 3fa5155d2433eb59a9dc94c000e55a435c78f411 Mon Sep 17 00:00:00 2001 From: thehrz Date: Sun, 18 Aug 2024 23:57:19 +0800 Subject: [PATCH] pref: update IP check --- src/app/page.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index b99b2af..94ad72f 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -10,7 +10,9 @@ interface Myip { } export default function Home() { - const { data } = useSWR("/api/ip/myip", fetcher) + const { data: http4 } = useSWR("http://4.ipv6test.online/ip/myip", fetcher) + const { data: http6 } = useSWR("http://4.ipv6test.online/ip/myip", fetcher) + return (
@@ -20,8 +22,8 @@ export default function Home() {
-

IPv4 {data?.address}

-

IPv6 {data?.address}

+

IPv4 {http4?.address}

+

IPv6 {http6?.address}

{/* */}