MCPcopy Create free account
hub / github.com/codecombat/codecombat / getVueRouter

Function getVueRouter

app/core/vueRouter.js:7–498  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5let vueRouter
6
7export default function getVueRouter () {
8 if (typeof vueRouter === 'undefined') {
9 vueRouter = new VueRouter({
10 // Routing is currently driven by Backbone Router. When we migrate away from backbone, switch to history
11 mode: 'abstract',
12
13 routes: [
14 {
15 path: '/ai-junior',
16 component: () => import(/* webpackChunkName: "aiJunior" */ 'app/views/ai-junior/AIJuniorView'),
17 children: [
18 {
19 path: '',
20 component: () => import(/* webpackChunkName: "aiJunior" */ 'app/views/ai-junior/AIJuniorLandingView'),
21 },
22 {
23 path: 'project/:scenarioId',
24 component: () => import(/* webpackChunkName: "aiJunior" */ 'app/views/ai-junior/AIJuniorScenarioView'),
25 props: true,
26 },
27 {
28 path: 'project/:scenarioId/:userId',
29 component: () => import(/* webpackChunkName: "aiJunior" */ 'app/views/ai-junior/AIJuniorScenarioUserView'),
30 props: true,
31 },
32 {
33 path: 'project/:scenarioId/:userId/:projectId',
34 component: () => import(/* webpackChunkName: "aiJunior" */ 'app/views/ai-junior/AIJuniorScenarioUserProjectView'),
35 props: true,
36 },
37 {
38 path: 'demo',
39 component: () => import(/* webpackChunkName: "aiJunior" */ 'app/views/ai-junior/AIJuniorDemoView'),
40 props: true,
41 },
42 ],
43 },
44 {
45 path: '/announcements',
46 component: () => import(/* webpackChunkName: "AnnouncementView" */ 'app/views/announcement/AnnouncementView'),
47 },
48 {
49 path: '/premium',
50 props: (route) => ({ showPremium: true, type: route.query.type }),
51 component: () => import(/* webpackChunkName: "ParentsView" */ 'app/views/landing-pages/premium/PagePremium'),
52 meta: { theme: 'teal' },
53 },
54 {
55 path: '/parents',
56 props: (route) => ({ showPremium: true, type: route.query.type }),
57 component: () => import(/* webpackChunkName: "ParentsView" */ 'app/views/landing-pages/parents-v2/PageParents'),
58 meta: { theme: 'teal' },
59 },
60 {
61 path: '/hackstack',
62 component: () => import(/* webpackChunkName: "HackStackView" */ 'app/views/landing-pages/hackstack/PageHackStack'),
63 meta: { theme: 'teal' },
64 },

Callers

nothing calls this directly

Calls 3

isAdminMethod · 0.80
showChinaResourceInfoMethod · 0.80
isNewDashboardActiveMethod · 0.80

Tested by

no test coverage detected