diff options
author | Leon Jiang <35908040+leonyjiang@users.noreply.github.com> | 2021-03-10 23:00:12 -0500 |
---|---|---|
committer | Leon Jiang <35908040+leonyjiang@users.noreply.github.com> | 2021-03-10 23:00:12 -0500 |
commit | 5eabfa9af6df007bdee61382b4061db8ad5f0683 (patch) | |
tree | 703c568ed857def38aa391e60a711c157db576e4 | |
parent | 603b6e1e7afe464538aa1ab1b6ec9f892266d01b (diff) |
Utilize util to get search suggestions list
-rw-r--r-- | src/components/search/SearchBar.tsx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/components/search/SearchBar.tsx b/src/components/search/SearchBar.tsx index 61d7582f..1a855f20 100644 --- a/src/components/search/SearchBar.tsx +++ b/src/components/search/SearchBar.tsx @@ -13,7 +13,7 @@ import { import Animated, {interpolate} from 'react-native-reanimated'; import Icon from 'react-native-vector-icons/Feather'; import {normalize} from 'react-native-elements'; -import {SCREEN_HEIGHT} from '../../utils'; +import {SCREEN_HEIGHT, getSearchSuggestions} from '../../utils'; const AnimatedIcon = Animated.createAnimatedComponent(Icon); @@ -39,14 +39,7 @@ const SearchBar: React.FC<SearchBarProps> = ({ }; const DEFAULT_PLACEHOLDER: string = 'Search'; // the list of suggestions to cycle through. TODO: get this from the backend - const SEARCH_SUGGESTIONS: string[] = [ - "Brown '21", - "Brown '22", - "Brown '23", - "Brown '24", - 'Trending on Tagg', - 'New to Tagg', - ]; + const SEARCH_SUGGESTIONS: string[] = getSearchSuggestions(); /* * index & id of current placeholder, used in selecting next placeholder. -1 * indicates DEFAULT_PLACEHOLDER. TODO: make it appear more random by tracking |