Moved type definition

This commit is contained in:
Piotr Janosz
2019-08-05 18:21:23 +02:00
committed by fabioberger
parent ea2a453811
commit 16e55457c8

View File

@@ -28,8 +28,6 @@ interface ISnippetMatchLevels {
[index: string]: number;
}
const SNIPPET_MATCH_LEVELS: ISnippetMatchLevels = { none: 0, partial: 1, full: 2 };
interface IAutoCompleteProps {
isHome?: boolean;
hits?: object[];
@@ -37,6 +35,8 @@ interface IAutoCompleteProps {
refine?: (value: string) => void;
}
const SNIPPET_MATCH_LEVELS: ISnippetMatchLevels = { none: 0, partial: 1, full: 2 };
const CustomAutoComplete: React.FC<IAutoCompleteProps> = ({ isHome = false, hits = [], currentRefinement, refine }) => {
const [value, setValue] = React.useState<string>('');