Browse Source

fixed route declaration

Skylsmoi 5 years ago
parent
commit
b6b00a6680
1 changed files with 4 additions and 2 deletions
  1. 4 2
      frontend/src/container/Tracim.jsx

+ 4 - 2
frontend/src/container/Tracim.jsx View File

@@ -97,8 +97,8 @@ class Tracim extends React.Component {
97 97
 
98 98
                   <Route exact path={PAGE.WORKSPACE.ROOT} render={() => props.workspaceList.length === 0 // handle '/' and redirect to first workspace
99 99
                     ? null
100
-
101
-          <PrivateRoute path='/admin_temp/workspace' component={AdminWorkspacePage} />
100
+                    : <Redirect to={{pathname: `/workspaces/${props.workspaceList[0].id}/contents`, state: {from: props.location}}} />
101
+                  } />
102 102
 
103 103
                   <Route exact path={`${PAGE.WORKSPACE.ROOT}/:idws`} render={props2 => // handle '/workspaces/:id' and add '/contents'
104 104
                     <Redirect to={{pathname: `/workspaces/${props2.match.params.idws}/contents`, state: {from: props.location}}} />
@@ -118,6 +118,8 @@ class Tracim extends React.Component {
118 118
               <Redirect to={{pathname: '/login', state: {from: props.location}}} />
119 119
           }
120 120
 
121
+          <Route path='/admin_temp/workspace' component={AdminWorkspacePage} />
122
+
121 123
           <Route path={'/wip/:cp'} component={WIPcomponent} /> {/* for testing purpose only */}
122 124
 
123 125
           <div id='appFeatureContainer' />