Skip to content

Commit

Permalink
web/satellite/vuetify-poc: fix routing bugs
Browse files Browse the repository at this point in the history
This change fixes an issue where clicking on project settings on the
project card will navigate to the project dashboard. It also fixes an
issue where session timeout will redirect to the v1 login page instead
of the v2.

Change-Id: I1a112416cb0d78097ef506b73501bbc2052ae5f5
  • Loading branch information
wilfred-asomanii authored and Storj Robot committed Dec 7, 2023
1 parent 35d8455 commit 87ab8dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion web/satellite/src/utils/httpClient.ts
Expand Up @@ -101,7 +101,12 @@ export class HttpClient {
}

setTimeout(() => {
window.location.href = window.location.origin + '/login';
const origin = window.location.origin;
if (document.querySelector('.v-overlay-container')) {
window.location.href = origin + '/' + import.meta.env.VITE_VUETIFY_PREFIX + '/login';
return;
}
window.location.href = origin + '/login';
}, 2000);
}
}
Expand Down
2 changes: 1 addition & 1 deletion web/satellite/vuetify-poc/src/components/ProjectCard.vue
Expand Up @@ -140,7 +140,7 @@ function openProject(): void {
function onSettingsClick(): void {
if (!props.item) return;
projectsStore.selectProject(props.item.id);
router.push(`/projects/${projectsStore.state.selectedProject.urlId}/dashboard`);
router.push(`/projects/${projectsStore.state.selectedProject.urlId}/settings`);
}

/**
Expand Down

0 comments on commit 87ab8dc

Please sign in to comment.