diff --git a/src/App.tsx b/src/App.tsx index d6f2a22..af06491 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -7,7 +7,7 @@ import Sidebar from "./components/Sidebar/Sidebar"; import Splashcreen from "./components/Splashscreen/Splashscreen"; import { ToastContainer } from 'react-toastify'; -const url = import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV; +const url = import.meta.env.VITE_NODE_ENV=='development' ? import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV : import.meta.env.VITE_REACT_APP_BACKEND_URL; const backgroundStyle = { backgroundColor : "#ECEEF9", diff --git a/src/components/Forms/FakulForms.tsx b/src/components/Forms/FakulForms.tsx index c656bd6..3872a70 100644 --- a/src/components/Forms/FakulForms.tsx +++ b/src/components/Forms/FakulForms.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import { toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; -const url = import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV; +const url = import.meta.env.VITE_NODE_ENV=='development' ? import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV : import.meta.env.VITE_REACT_APP_BACKEND_URL; interface FakulFormProps { setNewFakulAdd: (value : boolean) => void; diff --git a/src/components/Forms/FakulUpload.tsx b/src/components/Forms/FakulUpload.tsx index 297ab76..9f142d4 100644 --- a/src/components/Forms/FakulUpload.tsx +++ b/src/components/Forms/FakulUpload.tsx @@ -4,7 +4,7 @@ import { toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import UploadImage from '../../assets/images/upload.png' -const url = import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV; +const url = import.meta.env.VITE_NODE_ENV=='development' ? import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV : import.meta.env.VITE_REACT_APP_BACKEND_URL; interface FakulUploadProps { setNewFakulAdd: (value : boolean) => void; diff --git a/src/components/Forms/JadwalForms.tsx b/src/components/Forms/JadwalForms.tsx index e6ab274..8be502c 100644 --- a/src/components/Forms/JadwalForms.tsx +++ b/src/components/Forms/JadwalForms.tsx @@ -3,7 +3,7 @@ import { toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import Dropdown from "../Dropdown/Dropdown"; -const url = import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV; +const url = import.meta.env.VITE_NODE_ENV=='development' ? import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV : import.meta.env.VITE_REACT_APP_BACKEND_URL; interface jadwalFormProps { jurusanData: string[]; diff --git a/src/components/Forms/JurusanForms.tsx b/src/components/Forms/JurusanForms.tsx index 304c533..c7c54ea 100644 --- a/src/components/Forms/JurusanForms.tsx +++ b/src/components/Forms/JurusanForms.tsx @@ -3,7 +3,7 @@ import { toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import Dropdown from "../Dropdown/Dropdown"; -const url = import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV; +const url = import.meta.env.VITE_NODE_ENV=='development' ? import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV : import.meta.env.VITE_REACT_APP_BACKEND_URL; interface jurusanFormProps { fakultasData: string[]; diff --git a/src/components/Forms/JurusanUpload.tsx b/src/components/Forms/JurusanUpload.tsx index 26bccba..4162fba 100644 --- a/src/components/Forms/JurusanUpload.tsx +++ b/src/components/Forms/JurusanUpload.tsx @@ -4,7 +4,7 @@ import { toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import UploadImage from '../../assets/images/upload.png' -const url = import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV; +const url = import.meta.env.VITE_NODE_ENV=='development' ? import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV : import.meta.env.VITE_REACT_APP_BACKEND_URL; interface JurusanUploadProps { fakultasData: string[]; diff --git a/src/components/Forms/MatkulForms.tsx b/src/components/Forms/MatkulForms.tsx index 920deaf..77f44ad 100644 --- a/src/components/Forms/MatkulForms.tsx +++ b/src/components/Forms/MatkulForms.tsx @@ -3,7 +3,7 @@ import { toast } from 'react-toastify'; import Dropdown from "../Dropdown/Dropdown"; import 'react-toastify/dist/ReactToastify.css'; -const url = import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV; +const url = import.meta.env.VITE_NODE_ENV=='development' ? import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV : import.meta.env.VITE_REACT_APP_BACKEND_URL; interface matkulFormProps { jurusanData: string[]; diff --git a/src/components/Forms/MatkulUpload.tsx b/src/components/Forms/MatkulUpload.tsx index b3c63c2..ea3e586 100644 --- a/src/components/Forms/MatkulUpload.tsx +++ b/src/components/Forms/MatkulUpload.tsx @@ -4,7 +4,7 @@ import { toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import UploadImage from '../../assets/images/upload.png' -const url = import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV; +const url = import.meta.env.VITE_NODE_ENV=='development' ? import.meta.env.VITE_REACT_APP_BACKEND_URL_DEV : import.meta.env.VITE_REACT_APP_BACKEND_URL; interface MatkulUploadProps { jurusanData: string[];