Skip to content

Commit

Permalink
Review isLoading
Browse files Browse the repository at this point in the history
  • Loading branch information
zyhou committed May 23, 2019
1 parent 8c76f07 commit 9c8f2d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/simple/src/comments/PostPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const PostPreview = props => {
[props.resource, props.id],
);
const version = useSelector(state => state.admin.ui.viewVersion);
const isLoading = useSelector(state => state.admin.loading > 0);

return (
<SimpleShowLayout version={version} record={record} {...props}>
Expand Down
7 changes: 3 additions & 4 deletions examples/simple/src/posts/PostCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ const SaveWithNoteButton = props => {
const { basePath, handleSubmit, redirect } = props;

const handleClick = useCallback(
() => {
return handleSubmit(values => {
() =>
handleSubmit(values => {
dispatch(saveWithNote(values, basePath, redirect));
});
},
}),
[basePath, redirect],
);

Expand Down

0 comments on commit 9c8f2d7

Please sign in to comment.