Small refactoring of search input
This commit is contained in:
committed by
fabioberger
parent
6094fa7b6d
commit
28d7cf38c8
@@ -15,7 +15,7 @@ interface ISearchInputProps {
|
||||
|
||||
const AutoComplete = connectAutoComplete(CustomAutoComplete);
|
||||
|
||||
export const SearchInput: React.FC<ISearchInputProps> = props => (
|
||||
export const SearchInput: React.FC<ISearchInputProps> = ({ isHome }) => (
|
||||
<InstantSearch
|
||||
searchClient={searchClient}
|
||||
indexName="0x_tools_test"
|
||||
@@ -26,23 +26,19 @@ export const SearchInput: React.FC<ISearchInputProps> = props => (
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Wrapper isHome={props.isHome}>
|
||||
<AutoComplete isHome={props.isHome} />
|
||||
<Wrapper isHome={isHome}>
|
||||
<AutoComplete isHome={isHome} />
|
||||
<Configure hitsPerPage={5} distinct={true} />
|
||||
<Index indexName="0x_tools_test" />
|
||||
<Index indexName="0x_guides_test" />
|
||||
<Label>
|
||||
<LabelText>Search query</LabelText>
|
||||
{/* <Input isHome={props.isHome} />*/}
|
||||
{/* <Input isHome={isHome} />*/}
|
||||
</Label>
|
||||
</Wrapper>
|
||||
</InstantSearch>
|
||||
);
|
||||
|
||||
SearchInput.defaultProps = {
|
||||
isHome: false,
|
||||
};
|
||||
|
||||
const Wrapper = styled.div<ISearchInputProps>`
|
||||
width: 100%;
|
||||
max-width: 240px;
|
||||
|
||||
Reference in New Issue
Block a user