resources/js/MultipleDashboard.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 1.5

Size

Lines of Code 23
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 12
c 0
b 0
f 0
dl 0
loc 23
rs 10
mnd 1
bc 1
fnc 2
bpm 0.5
cpm 1.5
noi 1
1
import Dashboard from './components/Dashboard';
2
3
Nova.booting((Vue, router) => {
0 ignored issues
show
Bug introduced by
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