zod parse env vars

This commit is contained in:
2026-06-03 10:35:12 +02:00
parent 9bb2cf331f
commit 95973937f5
3 changed files with 67 additions and 4 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import {
useState,
} from "react";
import { toast } from "react-toastify";
import { env } from "#/env.ts";
import type { IHeader, IPosition } from "#/interfaces.ts";
import { gameReducer, initialGameState } from "#/reducers/gameReducer.ts";
import { downloadPDF } from "#/utils/pdfUtils.ts";
@@ -48,7 +49,7 @@ export const useChessGame = () => {
const { diagrams, diagramClock } = gameState;
const pgnString = buildPgnString(gameState);
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL;
const apiBaseUrl = env.VITE_API_BASE_URL;
const response = await fetch(`${apiBaseUrl}/pdf`, {
method: "POST",