diff --git a/front/views/HomeView.tsx b/front/views/HomeView.tsx
index 358f49c..35a2d2e 100644
--- a/front/views/HomeView.tsx
+++ b/front/views/HomeView.tsx
@@ -135,7 +135,7 @@ const HomeView = () => {
searchHistoryQuery.data?.length === 0 &&
}
{
- searchHistoryQuery.data?.slice(0, 5).map((search) => (
+ [...(new Set(searchHistoryQuery.data.map((x) => x.query)))].reverse().slice(0, 5).map((query) => (
@@ -143,15 +143,15 @@ const HomeView = () => {
style={{
margin: 2,
}}
- key={ search.id }
+ key={ query }
variant="solid"
size="xs"
colorScheme="primary"
- onPress={() => navigation.navigate('Search', { query: search.query })}
+ onPress={() => navigation.navigate('Search', { query: query })}
>
-
- { search.query}
-
+
+ { query}
+
))
}