@@ -37,7 +37,7 @@ const mobileFirst = (MobileComponent, Fallback) => props => (
37
37
// TODO: This short-circuit seems unnecessary - using the mobile <Switch /> navigator (future) should prevent this from being called
38
38
const onRouteChange = ( store ) => {
39
39
const path = window . location . pathname ;
40
- if ( path . includes ( '/mobile/ preview' ) ) return ;
40
+ if ( path . includes ( 'preview' ) ) return ;
41
41
42
42
store . dispatch ( stopSketch ( ) ) ;
43
43
} ;
@@ -57,28 +57,24 @@ const routes = store => (
57
57
< Route path = "/projects/:project_id" component = { IDEView } />
58
58
< Route path = "/:username/full/:project_id" component = { FullView } />
59
59
< Route path = "/full/:project_id" component = { FullView } />
60
+
61
+ < Route path = "/:username/assets" component = { userIsAuthenticated ( userIsAuthorized ( mobileFirst ( MobileDashboardView , DashboardView ) ) ) } />
62
+ < Route path = "/:username/sketches" component = { mobileFirst ( MobileDashboardView , DashboardView ) } />
63
+ < Route path = "/:username/sketches/:project_id" component = { mobileFirst ( MobileIDEView , IDEView ) } />
64
+ < Route path = "/:username/sketches/:project_id/add-to-collection" component = { mobileFirst ( MobileIDEView , IDEView ) } />
65
+ < Route path = "/:username/collections" component = { mobileFirst ( MobileDashboardView , DashboardView ) } />
66
+
67
+ < Route path = "/:username/collections/create" component = { DashboardView } />
68
+ < Route path = "/:username/collections/:collection_id" component = { CollectionView } />
69
+
60
70
< Route path = "/sketches" component = { createRedirectWithUsername ( '/:username/sketches' ) } />
61
- < Route path = "/:username/assets" component = { userIsAuthenticated ( userIsAuthorized ( DashboardView ) ) } />
62
71
< Route path = "/assets" component = { createRedirectWithUsername ( '/:username/assets' ) } />
63
72
< Route path = "/account" component = { userIsAuthenticated ( AccountView ) } />
64
- < Route path = "/:username/sketches/:project_id" component = { IDEView } />
65
- < Route path = "/:username/sketches/:project_id/add-to-collection" component = { IDEView } />
66
- < Route path = "/:username/sketches" component = { DashboardView } />
67
- < Route path = "/:username/collections" component = { DashboardView } />
68
- < Route path = "/:username/collections/create" component = { DashboardView } />
69
- < Route path = "/:username/collections/:collection_id" component = { CollectionView } />
70
73
< Route path = "/about" component = { IDEView } />
71
74
72
- < Route path = "/mobile" component = { MobileIDEView } />
73
-
74
- < Route path = "/mobile/preview" component = { MobileSketchView } />
75
- < Route path = "/mobile/preferences" component = { MobilePreferences } />
76
-
77
- < Route path = "/mobile/:username/sketches/:project_id" component = { MobileIDEView } />
78
- < Route path = "/mobile/:username/assets" component = { userIsAuthenticated ( userIsAuthorized ( MobileDashboardView ) ) } />
79
- < Route path = "/mobile/:username/sketches" component = { MobileDashboardView } />
80
- < Route path = "/mobile/:username/collections" component = { MobileDashboardView } />
81
- < Route path = "/mobile/:username/collections/create" component = { MobileDashboardView } />
75
+ { /* Mobile-only Routes */ }
76
+ < Route path = "/preview" component = { MobileSketchView } />
77
+ < Route path = "/preferences" component = { MobilePreferences } />
82
78
83
79
</ Route >
84
80
) ;
0 commit comments