|
@@ -21,6 +21,7 @@ import Navbar from 'components/Navbar';
|
|
|
import { Link, RouteComponentProps } from 'react-router-dom';
|
|
import { Link, RouteComponentProps } from 'react-router-dom';
|
|
|
import Input from 'components/Input';
|
|
import Input from 'components/Input';
|
|
|
import { throttle } from 'throttle-debounce';
|
|
import { throttle } from 'throttle-debounce';
|
|
|
|
|
+import Spinner from 'components/Spinner';
|
|
|
|
|
|
|
|
import './styles.scss';
|
|
import './styles.scss';
|
|
|
import { UiState, Display } from "types/ui";
|
|
import { UiState, Display } from "types/ui";
|
|
@@ -44,7 +45,7 @@ class RecipeList extends Component<RecipeListProps, {phoneDisplay: boolean, sear
|
|
|
super(props);
|
|
super(props);
|
|
|
this.state = {
|
|
this.state = {
|
|
|
phoneDisplay: this.props.ui.display === Display.Mobile,
|
|
phoneDisplay: this.props.ui.display === Display.Mobile,
|
|
|
- search: ''
|
|
|
|
|
|
|
+ search: '',
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -129,8 +130,7 @@ class RecipeList extends Component<RecipeListProps, {phoneDisplay: boolean, sear
|
|
|
}]
|
|
}]
|
|
|
|
|
|
|
|
render() {
|
|
render() {
|
|
|
- const {data, selectedRecipe, selectRecipe} = this.props;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const {data, selectedRecipe, isFetching} = this.props;
|
|
|
return(
|
|
return(
|
|
|
<div className='cbk-recipes-list'>
|
|
<div className='cbk-recipes-list'>
|
|
|
<Navbar
|
|
<Navbar
|
|
@@ -152,7 +152,9 @@ class RecipeList extends Component<RecipeListProps, {phoneDisplay: boolean, sear
|
|
|
</Button>
|
|
</Button>
|
|
|
</Link>
|
|
</Link>
|
|
|
</Navbar>
|
|
</Navbar>
|
|
|
-
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ isFetching && (<Spinner/>)
|
|
|
|
|
+ }
|
|
|
<Grid>
|
|
<Grid>
|
|
|
<Row>
|
|
<Row>
|
|
|
<Cell columns={6} phoneColumns={4} tabletColumns={8}>
|
|
<Cell columns={6} phoneColumns={4} tabletColumns={8}>
|