diff --git a/app/client/.env.example b/app/client/.env.example deleted file mode 100644 index 1fc0f534..00000000 --- a/app/client/.env.example +++ /dev/null @@ -1,6 +0,0 @@ -# NOTE: For local development, set `VITE_FORMIO_BASE_URL` and -# `VITE_FORMIO_PROJECT_NAME` to the same values used in the server app's -# `FORMIO_BASE_URL` and `FORMIO_PROJECT_NAME` env variables. When deployed, a -# GitHub Actions Workflow does this in the "build" npm script. -VITE_FORMIO_BASE_URL= -VITE_FORMIO_PROJECT_NAME= diff --git a/app/client/src/config.tsx b/app/client/src/config.tsx index 33ef4bc5..4ea4654d 100644 --- a/app/client/src/config.tsx +++ b/app/client/src/config.tsx @@ -1,20 +1,4 @@ -const { - MODE, - VITE_SERVER_BASE_PATH, - VITE_CLOUD_SPACE, - VITE_FORMIO_BASE_URL, - VITE_FORMIO_PROJECT_NAME, -} = import.meta.env; - -if (!VITE_FORMIO_BASE_URL) { - const message = `Required VITE_FORMIO_BASE_URL environment variable not found.`; - throw new Error(message); -} - -if (!VITE_FORMIO_PROJECT_NAME) { - const message = `Required VITE_FORMIO_PROJECT_NAME environment variable not found.`; - throw new Error(message); -} +const { MODE, VITE_SERVER_BASE_PATH, VITE_CLOUD_SPACE } = import.meta.env; // allows the app to be accessed from a sub directory of a server (e.g. /csb) export const serverBasePath = @@ -25,12 +9,6 @@ export const serverUrl = window.location.origin + serverBasePath; export const cloudSpace = MODE === "development" ? "dev" : VITE_CLOUD_SPACE || ""; -export const formioBaseUrl = VITE_FORMIO_BASE_URL; - -const formioProjectName = VITE_FORMIO_PROJECT_NAME; - -export const formioProjectUrl = `${formioBaseUrl}/${formioProjectName}`; - export const messages = { genericError: "The application has encountered an unknown error.", authError: "Authentication error. Please log in again or contact support.",