diff --git a/.github/workflows/all-app-sandbox.yml b/.github/workflows/all-app-sandbox.yml index 45f36483..b3e750a4 100644 --- a/.github/workflows/all-app-sandbox.yml +++ b/.github/workflows/all-app-sandbox.yml @@ -74,7 +74,7 @@ jobs: REACT_APP_POST_LEARNER_PROGRESS: ${{ vars.REACT_APP_POST_LEARNER_PROGRESS }} REACT_APP_IS_APP_IFRAME: ${{ vars.REACT_APP_IS_APP_IFRAME }} REACT_APP_IS_IN_APP_AUTHORISATION: ${{ vars.REACT_APP_IS_IN_APP_AUTHORISATION }} - REACT_APP_IS_APP_LANGUAGES: ${{ vars.REACT_APP_IS_APP_LANGUAGES }} + REACT_APP_LANGUAGES: ${{ vars.REACT_APP_LANGUAGES }} CI: false # Disabling CI to not treat warnings as errors run: npm run build diff --git a/.github/workflows/all-prod-rig.yml b/.github/workflows/all-prod-rig.yml index d82589ea..98b6d296 100644 --- a/.github/workflows/all-prod-rig.yml +++ b/.github/workflows/all-prod-rig.yml @@ -74,7 +74,7 @@ jobs: REACT_APP_POST_LEARNER_PROGRESS: ${{ vars.REACT_APP_POST_LEARNER_PROGRESS }} REACT_APP_IS_APP_IFRAME: ${{ vars.REACT_APP_IS_APP_IFRAME }} REACT_APP_IS_IN_APP_AUTHORISATION: ${{ vars.REACT_APP_IS_IN_APP_AUTHORISATION }} - REACT_APP_IS_APP_LANGUAGES: ${{ vars.REACT_APP_IS_APP_LANGUAGES }} + REACT_APP_LANGUAGES: ${{ vars.REACT_APP_LANGUAGES }} CI: false # Disabling CI to not treat warnings as errors run: npm run build diff --git a/src/components/Assesment/Assesment.jsx b/src/components/Assesment/Assesment.jsx index bd7486ff..d38d858a 100644 --- a/src/components/Assesment/Assesment.jsx +++ b/src/components/Assesment/Assesment.jsx @@ -357,7 +357,7 @@ export const ProfileHeader = ({ const handleLogout = () => { localStorage.clear(); end({}); - navigate("/Login"); + navigate("/login"); }; const CustomIconButton = styled(IconButton)({ diff --git a/src/routes/index.js b/src/routes/index.js index 17eb01df..ac4898ac 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -3,6 +3,12 @@ import * as reviews from "../views"; const routData = [ + { + id: "route-001", + path: "/", + component: reviews.DiscoverStart, + requiresAuth: true, + }, { id: "route-002", path: "/discover", @@ -53,6 +59,12 @@ const routData = [ component: reviews.PracticeRedirectPage, requiresAuth: true, }, + { + id: "route-010", + path: "/login", + component: reviews.LoginPage, + requiresAuth: false, + }, ]; // add login route for test rig @@ -61,12 +73,6 @@ const isLogin = import.meta.env.VITE_APP_IS_IN_APP_AUTHORISATION === 'true'; if (isLogin && !virtualId) { routData.push( - { - id: "route-001", - path: "/", - component: reviews.LoginPage, - requiresAuth: true, - }, { id: "route-000", path: "*", @@ -76,12 +82,6 @@ if (isLogin && !virtualId) { ); }else { routData.push( - { - id: "route-001", - path: "/", - component: reviews.DiscoverStart, - requiresAuth: false, - }, { id: "route-000", path: "*", diff --git a/src/views/AppContent/AppContent.jsx b/src/views/AppContent/AppContent.jsx index 7cf3cf9f..d054867a 100644 --- a/src/views/AppContent/AppContent.jsx +++ b/src/views/AppContent/AppContent.jsx @@ -7,7 +7,7 @@ const PrivateRoute = (props) => { const navigate = useNavigate(); useEffect(() => { if (!virtualId && props.requiresAuth) { - navigate("/"); + navigate("/login"); } }, [virtualId]);