Issues (39)

resources/js/MultipleDashboard.js (1 issue)

Labels
Severity
1
import Dashboard from './components/Dashboard';
2
3
Nova.booting((Vue, router) => {
0 ignored issues
show
The variable Nova seems to be never declared. If this is a global, consider adding a /** global: Nova */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
4
    router.beforeEach((to, from, next) => {
5
        /**
6
         * Load the dashboard using our custom route.
7
         */
8
        if (to.name == 'dashboard' && to.path == '/') {
9
            next('/dashboards/main');
10
        }
11
12
        next();
13
    });
14
15
    router.addRoutes([
16
        {
17
            name: 'dashboard.custom',
18
            path: '/dashboards/:dashboardName',
19
            component: Dashboard,
20
            props: true,
21
        },
22
    ])
23
})
24