diff --git a/src/routes/Apps/App.tsx b/src/routes/Apps/App.tsx index d6c99bc..80be5e3 100644 --- a/src/routes/Apps/App.tsx +++ b/src/routes/Apps/App.tsx @@ -43,7 +43,7 @@ export const AppDetail: React.FC = () => { // Use to refresh page const [refreshKey, setRefreshKey] = useState(0); - const isMockMode = false; + const isMockMode = import.meta.env.VITE_MOCK_AUTH === 'true'; const getServiceClass = (state: string, status: string) => { if (state === "running" && status.includes("\(healthy\)")) return "service-card dark-green"; if (status.includes("unhealthy")) return "service-card red" diff --git a/src/routes/Apps/Apps.tsx b/src/routes/Apps/Apps.tsx index fccdf0f..8c44776 100644 --- a/src/routes/Apps/Apps.tsx +++ b/src/routes/Apps/Apps.tsx @@ -21,7 +21,7 @@ export const Apps: React.FC = () => { const [showUpgradesOnly, setShowUpgradesOnly] = useState(false); const [showChaosOnly, setShowChaosOnly] = useState(false); - const isMockMode = false; + const isMockMode = import.meta.env.VITE_MOCK_AUTH === 'true'; useEffect(() => { const fetchData = async () => { diff --git a/src/routes/Dashboard/Dashboard.tsx b/src/routes/Dashboard/Dashboard.tsx index ab40378..0294c34 100644 --- a/src/routes/Dashboard/Dashboard.tsx +++ b/src/routes/Dashboard/Dashboard.tsx @@ -13,7 +13,7 @@ export const Dashboard: React.FC = () => { const [error, setError] = useState(''); const navigate = useNavigate(); - const isMockMode = false; + const isMockMode = import.meta.env.VITE_MOCK_AUTH === 'true'; useEffect(() => { const fetchData = async () => { diff --git a/src/routes/Recipes/Recipes.tsx b/src/routes/Recipes/Recipes.tsx index 40c0f88..eb91d33 100644 --- a/src/routes/Recipes/Recipes.tsx +++ b/src/routes/Recipes/Recipes.tsx @@ -20,7 +20,7 @@ export const Recipes: React.FC = () => { - const isMockMode = false; + const isMockMode = import.meta.env.VITE_MOCK_AUTH === 'true'; useEffect(() => { const fetchData = async () => { diff --git a/src/routes/Servers/Server.tsx b/src/routes/Servers/Server.tsx index d02ebf5..f895a51 100644 --- a/src/routes/Servers/Server.tsx +++ b/src/routes/Servers/Server.tsx @@ -30,7 +30,7 @@ export const Server: React.FC = () => { const [terminalLogs, setTerminalLogs] = useState([]); const [terminalActive, setTerminalActive] = useState(false); - const isMockMode = false; + const isMockMode = import.meta.env.VITE_MOCK_AUTH === 'true'; useEffect(() => { const fetchServer = async () => { diff --git a/src/routes/Servers/Servers.tsx b/src/routes/Servers/Servers.tsx index 3c6d7fb..6d3d84b 100644 --- a/src/routes/Servers/Servers.tsx +++ b/src/routes/Servers/Servers.tsx @@ -25,7 +25,7 @@ export const Servers: React.FC = () => { const [showUpgradesOnly, setShowUpgradesOnly] = useState(false); const [showChaosOnly, setShowChaosOnly] = useState(false); - const isMockMode = false; + const isMockMode = import.meta.env.VITE_MOCK_AUTH === 'true'; useEffect(() => { const fetchData = async () => {