Skip to content

Commit

Permalink
fix(portal login): registration navigation (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhigarg-bmw authored Feb 9, 2024
1 parent 2d2bf4e commit 69ecc07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/components/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { useTranslation } from 'react-i18next'
import AccessService from '../services/AccessService'
import MainOverlay from './MainOverlay'
import { show } from 'features/control/overlay'
import { OVERLAYS } from 'types/Constants'
import { OVERLAYS, PAGES } from 'types/Constants'
import MainNotify from './MainNotify'
import MainSearchOverlay from './shared/frame/SearchOverlay'
import { MenuInfo } from './pages/Home/components/MenuInfo'
Expand All @@ -40,6 +40,7 @@ import {
import './styles/main.scss'
import RegistrationStatus from './pages/RegistrationStatus'
import Logout from './pages/Logout'
import Redirect from './actions/Redirect'

export default function Main() {
document.title = useTranslation().t('title')
Expand All @@ -54,6 +55,9 @@ export default function Main() {
overlay && dispatch(show(overlay[0] as OVERLAYS, overlay[1]))
}, [dispatch, searchParams])

if (location.pathname === `/${PAGES.REGISTRATION}`)
return <Redirect path="registration" />

if (
companyData &&
[
Expand Down
4 changes: 0 additions & 4 deletions src/types/Config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ export const ALL_PAGES: IPage[] = [
name: PAGES.STORYBOOK,
element: <Redirect path="_storybook" tab={'storybook'} />,
},
{
name: PAGES.REGISTRATION,
element: <Redirect path="registration" tab={'registration'} />,
},
{
name: PAGES.MARKETPLACE,
role: ROLES.APPSTORE_VIEW,
Expand Down

0 comments on commit 69ecc07

Please sign in to comment.