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

@ -13,6 +13,7 @@ import { Button } from "@/components/ui/button";
import { useMediaQuery } from "@/hooks/use-media-query";
import { baseApiService } from "@/lib/apis/base-api.service";
import { getAuthHeaders } from "@/lib/auth-utils";
import { BACKEND_URL } from "@/lib/env-config";
pdfjsLib.GlobalWorkerOptions.workerSrc = new URL(
"pdfjs-dist/build/pdf.worker.min.mjs",
@ -222,7 +223,7 @@ function ResumeCard({
const previewPath = shareToken
? `/api/v1/public/${shareToken}/reports/${reportId}/preview`
: `/api/v1/reports/${reportId}/preview`;
setPdfUrl(`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}${previewPath}`);
setPdfUrl(`${BACKEND_URL}${previewPath}`);
if (autoOpen && isDesktop && !autoOpenedRef.current) {
autoOpenedRef.current = true;