diff --git a/front/next-env.d.ts b/front/next-env.d.ts index 9edff1c..c4b7818 100644 --- a/front/next-env.d.ts +++ b/front/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/types/routes.d.ts"; +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/front/src/lib/client.ts b/front/src/lib/client.ts index 17506eb..98b1f57 100644 --- a/front/src/lib/client.ts +++ b/front/src/lib/client.ts @@ -1,21 +1,10 @@ import "server-only"; import { createClient } from "@content-island/api-client"; -/** - * Ensures required environment variables exist. - */ -function requireEnv(name: string): string { - const value = process.env[name]; - if (!value) { - throw new Error(`Missing environment variable: ${name}`); - } - return value; -} - /** * Content Island client instance. * This file is server-only to prevent token exposure. */ export const contentIslandClient = createClient({ - accessToken: requireEnv("CONTENT_ISLAND_ACCESS_TOKEN"), + accessToken: process.env.CONTENT_ISLAND_ACCESS_TOKEN ?? "", }); diff --git a/front/src/pods/embalse/embalse.component.tsx b/front/src/pods/embalse/embalse.component.tsx index d964591..1c3b733 100644 --- a/front/src/pods/embalse/embalse.component.tsx +++ b/front/src/pods/embalse/embalse.component.tsx @@ -24,9 +24,11 @@ export const Embalse: React.FC = (props) => { /> -
- -
+ {reservoirData.reservoirInfo && ( +
+ +
+ )}