Skip to content

Commit d9da795

Browse files
author
Jovert Lota Palonpon
committed
wip
1 parent d8ff5bf commit d9da795

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

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

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Master extends Component {
6060
* @return {undefined}
6161
*/
6262
setGlobalMessage = () => {
63-
const { location } = this.props;
63+
const { history, location } = this.props;
6464

6565
const queryParams = UrlUtils._queryParams(location.search);
6666
const messageKeys = Object.keys(queryParams).filter(
@@ -73,7 +73,11 @@ class Master extends Component {
7373
message[key.match(/\[(.*)\]/).pop()] = queryParams[key];
7474
});
7575

76-
message.closed = () => this.setState({ message: {} });
76+
message.closed = () => {
77+
this.setState({ message: {} });
78+
79+
history.push(location.pathname);
80+
};
7781

7882
this.setState({ message });
7983
};
@@ -178,11 +182,9 @@ class Master extends Component {
178182
<Snackbar {...globalMessage} />
179183
)}
180184

181-
{!globalMessage &&
182-
message &&
183-
message.hasOwnProperty('type') > 0 && (
184-
<Snackbar {...message} />
185-
)}
185+
{message && message.hasOwnProperty('type') > 0 && (
186+
<Snackbar {...message} />
187+
)}
186188

187189
{alert && alert.hasOwnProperty('type') > 0 && (
188190
<Modal {...alert} />
@@ -232,9 +234,12 @@ const styles = theme => ({
232234

233235
content: {
234236
flex: 1,
235-
padding: theme.spacing.unit * 4,
237+
padding: theme.spacing.unit,
236238
marginBottom: '5rem',
237239
backgroundColor: theme.palette.grey['200'],
240+
[theme.breakpoints.up('sm')]: {
241+
padding: theme.spacing.unit * 4,
242+
},
238243
},
239244

240245
loadingContainer: {

resources/js/views/__backoffice/users/Create.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,6 @@ const styles = theme => ({
512512
},
513513

514514
pageContent: {
515-
minWidth: 500,
516515
padding: theme.spacing.unit * 3,
517516
},
518517

0 commit comments

Comments
 (0)