From 876710b79125e3a21f7800e4be4e97fb11f589a1 Mon Sep 17 00:00:00 2001 From: Jaroslav Siroic Date: Mon, 7 Oct 2024 13:45:48 +0300 Subject: [PATCH] show login with password if not production --- src/pages/Login.tsx | 2 +- src/utils/routes.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx index 3f97eb7..0efe764 100644 --- a/src/pages/Login.tsx +++ b/src/pages/Login.tsx @@ -23,7 +23,7 @@ interface LoginProps { export const Login = () => { const captchaRef = useRef(); const { isLoading: userInfoLoading } = useUserInfo(); - const isProdEnvironment = import.meta.env.NODE_ENV === 'prod'; + const isProdEnvironment = import.meta.env.VITE_USER_NODE_ENV === 'production'; const handleLogin = async (values: LoginProps) => { const captchaToken = await captchaRef?.current?.execute(); const params = { ...values, captchaToken }; diff --git a/src/utils/routes.tsx b/src/utils/routes.tsx index 21cb74f..421d09b 100644 --- a/src/utils/routes.tsx +++ b/src/utils/routes.tsx @@ -151,7 +151,7 @@ const routes = [ slug: slugs.placesMap, component: , }, - import.meta.env.NODE_ENV === 'prod' + import.meta.env.VITE_USER_NODE_ENV === 'production' ? {} : { slug: '/profiliai/:id',