Browse Source

added missing sidebar on account page + bugfix about route

Skylsmoi 6 years ago
parent
commit
2d214ad437

+ 3 - 3
frontend/src/container/AppFullscreenManager.jsx View File

9
   constructor (props) {
9
   constructor (props) {
10
     super(props)
10
     super(props)
11
     this.state = {
11
     this.state = {
12
-      AmIMounted: false
12
+      isMounted: false
13
     }
13
     }
14
   }
14
   }
15
 
15
 
16
-  componentDidMount = () => this.setState({AmIMounted: true})
16
+  componentDidMount = () => this.setState({isMounted: true})
17
 
17
 
18
   render () {
18
   render () {
19
     const { props } = this
19
     const { props } = this
22
       <div className='AppFullScreenManager'>
22
       <div className='AppFullScreenManager'>
23
         <div id='appFullscreenContainer' />
23
         <div id='appFullscreenContainer' />
24
 
24
 
25
-        {this.state.AmIMounted && (// we must wait for the component to be fully mounted to be sure the div#appFullscreenContainer exists in DOM
25
+        {this.state.isMounted && (// we must wait for the component to be fully mounted to be sure the div#appFullscreenContainer exists in DOM
26
           <div className='emptyDiForRoute'>
26
           <div className='emptyDiForRoute'>
27
             <Route path={PAGE.ADMIN.WORKSPACE} render={() => {
27
             <Route path={PAGE.ADMIN.WORKSPACE} render={() => {
28
               props.renderAppFullscreen({slug: 'admin_workspace_user', hexcolor: '#7d4e24', type: 'workspace'}, props.user, {})
28
               props.renderAppFullscreen({slug: 'admin_workspace_user', hexcolor: '#7d4e24', type: 'workspace'}, props.user, {})

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

115
             </div>
115
             </div>
116
           } />
116
           } />
117
 
117
 
118
-          <Route path={PAGE.ACCOUNT} component={Account} />
118
+          <Route path={PAGE.ACCOUNT} render={() =>
119
+            <div className='sidebarpagecontainer'>
120
+              <Sidebar />
121
+              <Account />
122
+            </div>
123
+          } />
119
 
124
 
120
-          <Route path={PAGE.ADMIN.ROOT} component={AppFullscreenManager} />
125
+          <Route path={PAGE.ADMIN.ROOT} render={() =>
126
+            <div className='sidebarpagecontainer'>
127
+              <Sidebar />
128
+              <AppFullscreenManager />
129
+            </div>
130
+          } />
121
 
131
 
122
           <Route path='/admin_temp/workspace' component={AdminWorkspacePage} />
132
           <Route path='/admin_temp/workspace' component={AdminWorkspacePage} />
123
 
133