diff --git a/src/components/CheckItem.tsx b/src/components/CheckItem.tsx index 9197552..7b5ef14 100644 --- a/src/components/CheckItem.tsx +++ b/src/components/CheckItem.tsx @@ -1,3 +1,4 @@ +"use client" import { CheckItemIconState, CheckItemType } from "@/types/CheckItem" import { Icon } from "@iconify/react/dist/iconify.js" import useSWRImmutable from "swr/immutable" diff --git a/src/components/Checker.tsx b/src/components/Checker.tsx index df2c997..a896475 100644 --- a/src/components/Checker.tsx +++ b/src/components/Checker.tsx @@ -1,3 +1,4 @@ +"use client" import CheckItem from "./CheckItem" import { CheckItemType } from "@/types/CheckItem" @@ -8,7 +9,7 @@ const checkList: CheckItemType[] = [ const isIPv6 = data?.version == 6 return { 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 return { state: isIPv4 ? "ok" : "error", - text: "公网 IPv4 地址: " + (isIPv4 ? `${data?.address}` : "未检测到") + text: "公网 IPv4 地址: " + (isIPv4 ? `${data?.address}` : "未检测到"), } }, }, @@ -28,7 +29,7 @@ export default function Checker() { return ( <> {checkList.map((item, i) => { - return + return })} )