fix: update CheckItem to client component
This commit is contained in:
parent
6c9a08e20f
commit
f8ee75fb6a
@ -1,3 +1,4 @@
|
|||||||
|
"use client"
|
||||||
import { CheckItemIconState, CheckItemType } from "@/types/CheckItem"
|
import { CheckItemIconState, CheckItemType } from "@/types/CheckItem"
|
||||||
import { Icon } from "@iconify/react/dist/iconify.js"
|
import { Icon } from "@iconify/react/dist/iconify.js"
|
||||||
import useSWRImmutable from "swr/immutable"
|
import useSWRImmutable from "swr/immutable"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
"use client"
|
||||||
import CheckItem from "./CheckItem"
|
import CheckItem from "./CheckItem"
|
||||||
import { CheckItemType } from "@/types/CheckItem"
|
import { CheckItemType } from "@/types/CheckItem"
|
||||||
|
|
||||||
@ -8,7 +9,7 @@ const checkList: CheckItemType[] = [
|
|||||||
const isIPv6 = data?.version == 6
|
const isIPv6 = data?.version == 6
|
||||||
return {
|
return {
|
||||||
state: isIPv6 ? "ok" : "error",
|
state: isIPv6 ? "ok" : "error",
|
||||||
text: "公网 IPv6 地址: " + (isIPv6 ? `${data?.address}` : "未检测到")
|
text: "公网 IPv6 地址: " + (isIPv6 ? `${data?.address}` : "未检测到"),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -18,7 +19,7 @@ const checkList: CheckItemType[] = [
|
|||||||
const isIPv4 = data?.version == 4
|
const isIPv4 = data?.version == 4
|
||||||
return {
|
return {
|
||||||
state: isIPv4 ? "ok" : "error",
|
state: isIPv4 ? "ok" : "error",
|
||||||
text: "公网 IPv4 地址: " + (isIPv4 ? `${data?.address}` : "未检测到")
|
text: "公网 IPv4 地址: " + (isIPv4 ? `${data?.address}` : "未检测到"),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user