Skip to content

Commit

Permalink
Redirection and Landing Issue fix (#1382)
Browse files Browse the repository at this point in the history
Co-authored-by: NabeelAyubee <nayubi7@gmail.com>
  • Loading branch information
nabeelmd-eGov and NabeelAyubee authored Sep 11, 2024
1 parent 07be27a commit 374c3fe
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
27 changes: 10 additions & 17 deletions micro-ui/web/micro-ui-internals/packages/modules/core/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,15 @@ export const DigitAppWrapper = ({ stateCode, modules, appTenants, logoUrl, initD
}
>
<Switch>
{Digit.Utils.getMultiRootTenant() && (
<Route path={`/${window?.globalPath}`}>
<Route exact path={`/${window?.globalPath}/user/sign-up`}>
<SignUp stateCode={stateCode} />
</Route>
<Route exact path={`/${window?.globalPath}/user/otp`}>
<Otp />
</Route>
<Route exact path={`/${window?.globalPath}/user/url`}>
<ViewUrl />
</Route>
<Route>
<Redirect to={Digit.Utils.getMultiRootTenant() ? `/${window?.globalPath}/user/sign-up` : `/${window?.contextPath}/${defaultLanding}`} />
</Route>
</Route>
)}
<Route exact path={`/${window?.globalPath}/user/sign-up`}>
<SignUp stateCode={stateCode} />
</Route>
<Route exact path={`/${window?.globalPath}/user/otp`}>
<Otp />
</Route>
<Route exact path={`/${window?.globalPath}/user/url`}>
<ViewUrl />
</Route>
{window?.globalPath !== window?.contextPath && (
<Route path={`/${window?.contextPath}`}>
<DigitApp
Expand All @@ -127,7 +120,7 @@ export const DigitAppWrapper = ({ stateCode, modules, appTenants, logoUrl, initD
</Route>
)}
<Route>
<Redirect to={Digit.Utils.getMultiRootTenant() ? `/${window?.globalPath}/user/sign-up` : `/${window?.contextPath}/${defaultLanding}`} />
<Redirect to={`/${window?.globalPath}/user/sign-up`} />
</Route>
</Switch>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,25 @@ const DigitUIWrapper = ({ stateCode, enabledModules, moduleReducers, defaultLand
<Provider store={data}>
<Router>
<BodyContainer>
<DigitAppWrapper
initData={initData}
stateCode={stateCode}
modules={initData?.modules}
appTenants={initData.tenants}
logoUrl={initData?.stateInfo?.logoUrl}
defaultLanding={defaultLanding}
/>
{Digit.Utils.getMultiRootTenant() ? (
<DigitAppWrapper
initData={initData}
stateCode={stateCode}
modules={initData?.modules}
appTenants={initData.tenants}
logoUrl={initData?.stateInfo?.logoUrl}
defaultLanding={defaultLanding}
/>
) : (
<DigitApp
initData={initData}
stateCode={stateCode}
modules={initData?.modules}
appTenants={initData.tenants}
logoUrl={initData?.stateInfo?.logoUrl}
defaultLanding={defaultLanding}
/>
)}
</BodyContainer>
</Router>
</Provider>
Expand Down

0 comments on commit 374c3fe

Please sign in to comment.