diff --git a/app/javascript/dashboard/App.vue b/app/javascript/dashboard/App.vue
index 0fcb8c9fe..a63cb1a90 100644
--- a/app/javascript/dashboard/App.vue
+++ b/app/javascript/dashboard/App.vue
@@ -1,6 +1,5 @@
+
+
+
+
+
+
+
diff --git a/app/javascript/dashboard/routes/index.js b/app/javascript/dashboard/routes/index.js
index e69d0b5ad..27465eb39 100644
--- a/app/javascript/dashboard/routes/index.js
+++ b/app/javascript/dashboard/routes/index.js
@@ -18,8 +18,17 @@ export const validateAuthenticateRoutePermission = (to, next) => {
return '';
}
- if (!to.name) {
- return next(frontendURL(`accounts/${user.account_id}/dashboard`));
+ const { accounts = [], account_id: accountId } = user;
+
+ if (!accounts.length) {
+ if (to.name === 'no_accounts') {
+ return next();
+ }
+ return next(frontendURL('no-accounts'));
+ }
+
+ if (to.name === 'no_accounts' || !to.name) {
+ return next(frontendURL(`accounts/${accountId}/dashboard`));
}
const nextRoute = validateLoggedInRoutes(to, store.getters.getCurrentUser);