Skip to content

Commit

Permalink
default landing fix (#1380)
Browse files Browse the repository at this point in the history
* default landing fix

* added multiroottenant check

---------

Co-authored-by: NabeelAyubee <[email protected]>
  • Loading branch information
nabeelmd-eGov and NabeelAyubee committed Sep 10, 2024
1 parent 437eb1f commit cd8301a
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 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,15 +98,22 @@ export const DigitAppWrapper = ({ stateCode, modules, appTenants, logoUrl, initD
}
>
<Switch>
<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>
{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>
)}
{window?.globalPath !== window?.contextPath && (
<Route path={`/${window?.contextPath}`}>
<DigitApp
Expand All @@ -120,7 +127,7 @@ export const DigitAppWrapper = ({ stateCode, modules, appTenants, logoUrl, initD
</Route>
)}
<Route>
<Redirect to={`/${window?.globalPath}/user/sign-up`} />
<Redirect to={Digit.Utils.getMultiRootTenant() ? `/${window?.globalPath}/user/sign-up` : `/${window?.contextPath}/${defaultLanding}`} />
</Route>
</Switch>
</div>
Expand Down

0 comments on commit cd8301a

Please sign in to comment.