fix: Hydration error by making ENV variable public

This commit is contained in:
iMADi-ARCH 2023-05-23 18:03:13 +05:30
parent d0e00ecca2
commit 5e8439db9c
4 changed files with 4 additions and 4 deletions

View File

@ -1,2 +1,2 @@
ENV=local
NEXT_PUBLIC_ENV=local
NEXT_PUBLIC_BACKEND_URL=http://localhost:5050

View File

@ -1,2 +1,2 @@
ENV=local
NEXT_PUBLIC_ENV=local
BACKEND_URL="http://localhost:5050"

View File

@ -3,7 +3,7 @@ import Hero from "./Hero";
import { redirect } from "next/navigation";
export default function HomePage() {
if (process.env.ENV === "local") {
if (process.env.NEXT_PUBLIC_ENV === "local") {
redirect("/upload");
}

View File

@ -47,7 +47,7 @@ const NavBar: FC<NavBarProps> = ({}) => {
/>
<h1 className="font-bold">Quivr</h1>
</Link>
{process.env.ENV === "local" ? (
{process.env.NEXT_PUBLIC_ENV === "local" ? (
<ul className="flex gap-4 text-sm flex-1">
<li>
<Link href={"/upload"}>Upload</Link>