mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-18 09:00:30 -05:00
Fix search tabs
This commit is contained in:
parent
0a6092bde8
commit
cbc5bbd565
1 changed files with 3 additions and 4 deletions
|
@ -100,7 +100,7 @@ class Search extends React.Component {
|
||||||
</li>
|
</li>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
if (this.props.tab === type) {
|
if (this.state.tab === type) {
|
||||||
allTab = (
|
allTab = (
|
||||||
<a href={`/search/${type}?q=${term}/`}>
|
<a href={`/search/${type}?q=${term}/`}>
|
||||||
<li className="active">
|
<li className="active">
|
||||||
|
@ -137,7 +137,7 @@ class Search extends React.Component {
|
||||||
<Grid
|
<Grid
|
||||||
cards
|
cards
|
||||||
showAvatar
|
showAvatar
|
||||||
itemType={this.props.tab}
|
itemType={this.state.tab}
|
||||||
items={this.state.loaded}
|
items={this.state.loaded}
|
||||||
showFavorites={false}
|
showFavorites={false}
|
||||||
showLoves={false}
|
showLoves={false}
|
||||||
|
@ -159,8 +159,7 @@ class Search extends React.Component {
|
||||||
Search.propTypes = {
|
Search.propTypes = {
|
||||||
dispatch: PropTypes.func,
|
dispatch: PropTypes.func,
|
||||||
intl: intlShape,
|
intl: intlShape,
|
||||||
searchTerm: PropTypes.string,
|
searchTerm: PropTypes.string
|
||||||
tab: PropTypes.string
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
|
|
Loading…
Reference in a new issue