This commit is contained in:
Clément Le Bihan
2023-05-06 17:23:39 +02:00
parent 4d77007010
commit c82cdc0445
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -369,7 +369,7 @@ export default class API {
* @param lessonId the id to find the lesson
*/
public static async getSearchHistory(): Promise<SearchHistory[]> {
let tmp = await this.fetch({
const tmp = await this.fetch({
route: "/history/search",
});
+2 -2
View File
@@ -132,7 +132,7 @@ const HomeView = () => {
flexWrap: 'wrap',
}}>
{
searchHistoryQuery.data?.length === 0 && <Text><Translate translationKey='noRecentSearches'/></Text>
searchHistoryQuery.data?.length === 0 && <Translate translationKey='noRecentSearches'/>
}
{
[...(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 })}
>
<Text fontSize={"xs"} isTruncated maxW={"150px"}>
{ query}
{ query }
</Text>
</Button>
))