refactor(env): replace inline process.env reads with BACKEND_URL in tool-ui generators

This commit is contained in:
Varun Shukla 2026-05-19 01:36:01 +05:30
parent 8174949b38
commit f2d2ac3f4a
3 changed files with 6 additions and 4 deletions

View file

@ -19,6 +19,7 @@ import {
type CompiledSlide,
} from "./combined-player";
import { getPptxExportErrorToast, getVideoDownloadErrorToast } from "./errors";
import { BACKEND_URL } from "@/lib/env-config";
const GenerateVideoPresentationArgsSchema = z.object({
source_content: z.string(),
@ -136,7 +137,7 @@ function VideoPresentationPlayer({
const [isPptxExporting, setIsPptxExporting] = useState(false);
const [pptxProgress, setPptxProgress] = useState<string | null>(null);
const backendUrl = process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL ?? "";
const backendUrl = BACKEND_URL ?? "";
const audioBlobUrlsRef = useRef<string[]>([]);
const loadPresentation = useCallback(async () => {