diff --git a/front/API.ts b/front/API.ts index fcb35eb..0ba5501 100644 --- a/front/API.ts +++ b/front/API.ts @@ -300,7 +300,9 @@ export default class API { * @param query the string used to find the songs */ public static async searchSongs(query: string): Promise { - return Promise.all([1, 5, 2].map(API.getSong)); + return API.fetch({ + route: `/search/guess/song/${query}` + }); } /** diff --git a/front/components/SearchBar.tsx b/front/components/SearchBar.tsx index cdf7159..54dbf86 100644 --- a/front/components/SearchBar.tsx +++ b/front/components/SearchBar.tsx @@ -12,6 +12,7 @@ import { } from "native-base"; import React from "react"; import { Ionicons } from "@expo/vector-icons"; +import useColorScheme from "../hooks/colorScheme"; export enum SuggestionType { TEXT, @@ -57,20 +58,19 @@ const IllustratedSuggestion = ({ imageSrc, onPress, }: IllustratedSuggestionProps) => { + const colorScheme = useColorScheme(); return ( - + >{({ isHovered, isPressed }) => ( + - + )} ); }; const TextSuggestion = ({ text, onPress }: SuggestionProps) => { + const colorScheme = useColorScheme(); return ( - + >{({ isHovered, isPressed }) => ( + {text} - + )} ); }; diff --git a/front/views/HomeView.tsx b/front/views/HomeView.tsx index 512cca0..ca4bc7e 100644 --- a/front/views/HomeView.tsx +++ b/front/views/HomeView.tsx @@ -84,7 +84,7 @@ const HomeView = () => { navigation.navigate('Search')} />