From 5eabfa9af6df007bdee61382b4061db8ad5f0683 Mon Sep 17 00:00:00 2001 From: Leon Jiang <35908040+leonyjiang@users.noreply.github.com> Date: Wed, 10 Mar 2021 23:00:12 -0500 Subject: Utilize util to get search suggestions list --- src/components/search/SearchBar.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src') 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 = ({ }; 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 -- cgit v1.2.3-70-g09d2