From c82cdc044577e96ee92f41910d18b735d73ca2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sat, 6 May 2023 17:23:39 +0200 Subject: [PATCH] PR fixes --- front/API.ts | 2 +- front/views/HomeView.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/front/API.ts b/front/API.ts index c4c2324..7b4707c 100644 --- a/front/API.ts +++ b/front/API.ts @@ -369,7 +369,7 @@ export default class API { * @param lessonId the id to find the lesson */ public static async getSearchHistory(): Promise { - let tmp = await this.fetch({ + const tmp = await this.fetch({ route: "/history/search", }); diff --git a/front/views/HomeView.tsx b/front/views/HomeView.tsx index 35a2d2e..7cc73c6 100644 --- a/front/views/HomeView.tsx +++ b/front/views/HomeView.tsx @@ -132,7 +132,7 @@ const HomeView = () => { flexWrap: 'wrap', }}> { - searchHistoryQuery.data?.length === 0 && + searchHistoryQuery.data?.length === 0 && } { [...(new Set(searchHistoryQuery.data.map((x) => x.query)))].reverse().slice(0, 5).map((query) => ( @@ -150,7 +150,7 @@ const HomeView = () => { onPress={() => navigation.navigate('Search', { query: query })} > - { query} + { query } ))