From bc49460f75e13608626f1716f55c147ccf62b250 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Mon, 21 Oct 2024 00:17:41 +0800 Subject: [PATCH] fix: edge --- app/[locale]/(main)/[id]/page.tsx | 2 ++ app/[locale]/(main)/page.tsx | 2 ++ app/api/detail/route.ts | 1 + app/api/monitor/route.ts | 1 + 4 files changed, 6 insertions(+) diff --git a/app/[locale]/(main)/[id]/page.tsx b/app/[locale]/(main)/[id]/page.tsx index 8695fb3..9614c6a 100644 --- a/app/[locale]/(main)/[id]/page.tsx +++ b/app/[locale]/(main)/[id]/page.tsx @@ -8,6 +8,8 @@ import { Separator } from "@/components/ui/separator"; import { useTranslations } from "next-intl"; import { useState } from "react"; +export const runtime = 'edge'; + export default function Page({ params }: { params: { id: string } }) { const t = useTranslations("TabSwitch"); diff --git a/app/[locale]/(main)/page.tsx b/app/[locale]/(main)/page.tsx index 79b4bd9..f40711c 100644 --- a/app/[locale]/(main)/page.tsx +++ b/app/[locale]/(main)/page.tsx @@ -2,6 +2,8 @@ import ServerList from "@/components/ServerList"; import ServerOverview from "@/components/ServerOverview"; import { unstable_setRequestLocale } from "next-intl/server"; +export const runtime = 'edge'; + export default function Home({ params: { locale }, }: { diff --git a/app/api/detail/route.ts b/app/api/detail/route.ts index b0f8bc1..4fd0885 100644 --- a/app/api/detail/route.ts +++ b/app/api/detail/route.ts @@ -3,6 +3,7 @@ import { GetServerDetail } from "@/lib/serverFetch"; import { NextResponse } from "next/server"; export const dynamic = "force-dynamic"; +export const runtime = 'edge'; interface NezhaDataResponse { error?: string; diff --git a/app/api/monitor/route.ts b/app/api/monitor/route.ts index e03fe89..bc10201 100644 --- a/app/api/monitor/route.ts +++ b/app/api/monitor/route.ts @@ -3,6 +3,7 @@ import { GetServerMonitor } from "@/lib/serverFetch"; import { NextResponse } from "next/server"; export const dynamic = "force-dynamic"; +export const runtime = 'edge'; interface NezhaDataResponse { error?: string;