diff options
author | 2018-12-09 13:24:17 +0100 | |
---|---|---|
committer | 2018-12-09 13:24:17 +0100 | |
commit | 898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de (patch) | |
tree | 9816c013f9a9453dae07d9dd8d4a862c77c23064 /src/containers/settings/RecipesScreen.js | |
parent | Upgrade to react 16 (diff) | |
download | ferdium-app-898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de.tar.gz ferdium-app-898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de.tar.zst ferdium-app-898d54cd0034bbb2727bc5b5eaf9d5a4f2a852de.zip |
Add React 16 didCatch/ErrorBoundary component
Diffstat (limited to 'src/containers/settings/RecipesScreen.js')
-rw-r--r-- | src/containers/settings/RecipesScreen.js | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index b125e6a05..1f05b6510 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js | |||
@@ -10,6 +10,7 @@ import UserStore from '../../stores/UserStore'; | |||
10 | import { gaPage } from '../../lib/analytics'; | 10 | import { gaPage } from '../../lib/analytics'; |
11 | 11 | ||
12 | import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; | 12 | import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; |
13 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | ||
13 | 14 | ||
14 | export default @inject('stores', 'actions') @observer class RecipesScreen extends Component { | 15 | export default @inject('stores', 'actions') @observer class RecipesScreen extends Component { |
15 | static propTypes = { | 16 | static propTypes = { |
@@ -93,19 +94,21 @@ export default @inject('stores', 'actions') @observer class RecipesScreen extend | |||
93 | || recipePreviews.searchRecipePreviewsRequest.isExecuting; | 94 | || recipePreviews.searchRecipePreviewsRequest.isExecuting; |
94 | 95 | ||
95 | return ( | 96 | return ( |
96 | <RecipesDashboard | 97 | <ErrorBoundary> |
97 | recipes={allRecipes} | 98 | <RecipesDashboard |
98 | isLoading={isLoading} | 99 | recipes={allRecipes} |
99 | addedServiceCount={services.all.length} | 100 | isLoading={isLoading} |
100 | isPremium={user.data.isPremium} | 101 | addedServiceCount={services.all.length} |
101 | hasLoadedRecipes={recipePreviews.featuredRecipePreviewsRequest.wasExecuted} | 102 | isPremium={user.data.isPremium} |
102 | showAddServiceInterface={showAddServiceInterface} | 103 | hasLoadedRecipes={recipePreviews.featuredRecipePreviewsRequest.wasExecuted} |
103 | searchRecipes={e => this.searchRecipes(e)} | 104 | showAddServiceInterface={showAddServiceInterface} |
104 | resetSearch={() => this.resetSearch()} | 105 | searchRecipes={e => this.searchRecipes(e)} |
105 | searchNeedle={this.state.needle} | 106 | resetSearch={() => this.resetSearch()} |
106 | serviceStatus={services.actionStatus} | 107 | searchNeedle={this.state.needle} |
107 | devRecipesCount={recipePreviews.dev.length} | 108 | serviceStatus={services.actionStatus} |
108 | /> | 109 | devRecipesCount={recipePreviews.dev.length} |
110 | /> | ||
111 | </ErrorBoundary> | ||
109 | ); | 112 | ); |
110 | } | 113 | } |
111 | } | 114 | } |