MCPcopy Index your code
hub / github.com/codecombat/codecombat / ''

Method ''

app/core/Router.js:42–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 static initClass () {
41 this.prototype.routes = {
42 '' () {
43 if (utils.getQueryVariable('hour_of_code')) {
44 delete window.alreadyLoadedView
45 return this.navigate('/play?hour_of_code=true', { trigger: true, replace: true })
46 }
47
48 if (utils.isCodeCombat) {
49 if (utils.getQueryVariable('payment-homeSubscriptions')) {
50 return this.routeDirectly('HomeView')
51 }
52 if (!me.isAnonymous() && !me.isStudent() && !me.isTeacher() && !me.isAdmin() && !me.hasSubscription() && !me.isAPIClient() && !paymentUtils.hasTemporaryPremiumAccess() && !me.isParentHome()) {
53 delete window.alreadyLoadedView
54 return this.navigate('/premium', { trigger: true, replace: true })
55 }
56 if (me.isAPIClient()) {
57 delete window.alreadyLoadedView
58 // return @navigate "/league/#{me.get('clans')?[0] ? ''}apiclient-data", {trigger: true, replace: true} # Once we make sure all students have been associated with their API creators
59 return this.navigate('/partner-dashboard', { trigger: true, replace: true })
60 }
61 if (me.useChinaHomeView()) {
62 delete window.alreadyLoadedView
63 return this.routeDirectly('HomeCNView', [])
64 }
65 }
66 if (utils.isCodeCombat) {
67 return this.routeDirectly('HomeBeta', [], { vueRoute: true, baseTemplate: 'base-flat-vue' })
68 } else {
69 return this.routeDirectly('HomeView', [])
70 }
71 },
72
73 about: go('AboutView'),
74 'contact-cn': go('ContactCNView'),

Callers

nothing calls this directly

Calls 10

navigateMethod · 0.95
routeDirectlyMethod · 0.95
isAnonymousMethod · 0.80
isStudentMethod · 0.80
isTeacherMethod · 0.80
isAdminMethod · 0.80
hasSubscriptionMethod · 0.80
isAPIClientMethod · 0.80
isParentHomeMethod · 0.80
useChinaHomeViewMethod · 0.80

Tested by

no test coverage detected