mirror of
https://github.com/TheRealOwenRees/chess-scribe-website.git
synced 2026-07-23 01:46:57 +00:00
zod parse env vars
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user