Fix double routing of root path
This commit is contained in:
@@ -96,6 +96,9 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
|
||||
}
|
||||
const systemInfo = await infoResponse.json();
|
||||
if (!systemInfo?.StartupWizardCompleted) {
|
||||
// Update the current ApiClient
|
||||
// TODO: Is there a better place to handle this?
|
||||
ServerConnections.setLocalApiClient(firstConnection.ApiClient);
|
||||
// Bounce to the wizard
|
||||
console.info('[ConnectionRequired] startup wizard is not complete, redirecting there');
|
||||
navigate(BounceRoutes.StartWizard);
|
||||
|
||||
@@ -412,11 +412,7 @@ class AppRouter {
|
||||
if (apiClient && apiClient.isLoggedIn()) {
|
||||
console.debug('[appRouter] user is authenticated');
|
||||
|
||||
if (route.isDefaultRoute) {
|
||||
console.debug('[appRouter] loading home page');
|
||||
this.goHome();
|
||||
return;
|
||||
} else if (route.roles) {
|
||||
if (route.roles) {
|
||||
this.#validateRoles(apiClient, route.roles).then(() => {
|
||||
callback();
|
||||
}, this.#beginConnectionWizard.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user