mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
Compare commits
2 Commits
56d28c1ec1
...
9854df5199
Author | SHA1 | Date | |
---|---|---|---|
|
9854df5199 | ||
|
b498b67ea3 |
@ -48,7 +48,7 @@ export default async function LocaleLayout({
|
|||||||
return (
|
return (
|
||||||
<html lang={locale} suppressHydrationWarning>
|
<html lang={locale} suppressHydrationWarning>
|
||||||
<head>
|
<head>
|
||||||
{!process.env.VERCEL && <PublicEnvScript />}
|
<PublicEnvScript />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.0.0/css/flag-icons.min.css"
|
href="https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.0.0/css/flag-icons.min.css"
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
import { env } from "next-runtime-env";
|
import { env } from "next-runtime-env";
|
||||||
|
|
||||||
export default function getEnv(key: string) {
|
export default function getEnv(key: string) {
|
||||||
if (process.env.VERCEL) {
|
|
||||||
return process.env[key];
|
|
||||||
} else {
|
|
||||||
if (key.startsWith("NEXT_PUBLIC_")) {
|
if (key.startsWith("NEXT_PUBLIC_")) {
|
||||||
return env(key);
|
return env(key);
|
||||||
}
|
}
|
||||||
return process.env[key];
|
return process.env[key];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user