Skip to content

Commit ad983c7

Browse files
author
Jovert Lota Palonpon
committed
wip
1 parent d4e446b commit ad983c7

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

resources/js/Backoffice.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ class Backoffice extends Component {
199199
expired = moment(token.expired_at).unix() > moment().unix();
200200
}
201201

202-
if (!expired) {
203-
await this.authenticate(JSON.stringify(token));
204-
}
202+
// if (!expired) {
203+
await this.authenticate(JSON.stringify(token));
204+
// }
205205

206206
this.setState({ loading: false });
207207
}

resources/js/views/__backoffice/layouts/Master.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ class Master extends Component {
9999
const { classes, ...childProps } = this.props;
100100

101101
const {
102+
children,
102103
history,
103104
location,
104-
children,
105+
pageTitle,
105106
pageProps,
106107
loading,
107108
message,
@@ -140,24 +141,21 @@ class Master extends Component {
140141
<Hidden smUp implementation="js">
141142
<Sidebar
142143
{...childProps}
143-
{...this.state}
144144
loading={loading}
145-
PaperProps={{ style: { width: drawerWidth } }}
145+
navigate={path => history.push(path)}
146146
variant="temporary"
147147
open={mobileOpen}
148148
onClose={this.handleDrawerToggled}
149-
locationPathname={location.pathname}
150-
navigate={path => history.push(path)}
149+
PaperProps={{ style: { width: drawerWidth } }}
151150
/>
152151
</Hidden>
153152

154153
<Hidden xsDown implementation="css">
155154
<Sidebar
156155
{...childProps}
157-
{...this.state}
158156
loading={loading}
159-
PaperProps={{ style: { width: drawerWidth } }}
160157
navigate={path => history.push(path)}
158+
PaperProps={{ style: { width: drawerWidth } }}
161159
/>
162160
</Hidden>
163161
</nav>

resources/js/views/__backoffice/partials/Sidebar.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,17 @@ import brandLogoLight from '../../../../img/logos/full-light.svg';
2525
import brandLogoDark from '../../../../img/logos/full-dark.svg';
2626

2727
const Sidebar = props => {
28-
const { classes, location, pageProps, loading, navigate } = props;
28+
const {
29+
classes,
30+
location,
31+
pageProps,
32+
pageTitle, // Never used here.
33+
primaryAction, // Never used here.
34+
staticContext, // Never used here.
35+
loading,
36+
navigate,
37+
...other
38+
} = props;
2939
const { nightMode } = pageProps;
3040

3141
const homeLink = {
@@ -232,13 +242,16 @@ const Sidebar = props => {
232242
);
233243

234244
return (
235-
<Drawer variant="permanent">
245+
<Drawer variant="permanent" {...other}>
236246
{loading ? renderLoading : renderNavigated}
237247
</Drawer>
238248
);
239249
};
240250

241251
Sidebar.propTypes = {
252+
open: PropTypes.bool,
253+
onClose: PropTypes.func,
254+
PaperProps: PropTypes.object.isRequired,
242255
classes: PropTypes.object.isRequired,
243256
pageProps: PropTypes.object.isRequired,
244257
};

0 commit comments

Comments
 (0)