|
@@ -33,7 +33,8 @@ class EditRecipe extends React.Component<EditRecipeProps, EditRecipeState> {
|
|
|
getRecipeById(this.props.match.params.id).then(recipe =>
|
|
getRecipeById(this.props.match.params.id).then(recipe =>
|
|
|
this.setState({
|
|
this.setState({
|
|
|
form: recipe,
|
|
form: recipe,
|
|
|
- loadingRecipe: false,
|
|
|
|
|
|
|
+ }, () => {
|
|
|
|
|
+ this.setState({ loadingRecipe: false })
|
|
|
}))
|
|
}))
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -55,6 +56,7 @@ class EditRecipe extends React.Component<EditRecipeProps, EditRecipeState> {
|
|
|
|
|
|
|
|
render() {
|
|
render() {
|
|
|
const { form, loadingRecipe } = this.state;
|
|
const { form, loadingRecipe } = this.state;
|
|
|
|
|
+ console.log("loading", loadingRecipe)
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
{ loadingRecipe && (<Spinner/>)}
|
|
{ loadingRecipe && (<Spinner/>)}
|