From 605d0990d3149ee684edda0c77fc8e32c774ec1c Mon Sep 17 00:00:00 2001 From: Imbus Date: Thu, 14 Dec 2023 23:17:34 +0100 Subject: [PATCH] Reloads now works without duplicating posts --- src/components/PostsContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PostsContainer.tsx b/src/components/PostsContainer.tsx index 71da5eb..50bc8e9 100644 --- a/src/components/PostsContainer.tsx +++ b/src/components/PostsContainer.tsx @@ -29,8 +29,8 @@ export function PostsContainer(): JSX.Element { function onRefresh(): void { setRefreshing(true); + setPostData([]); setPage(0); - setPostData(postData.slice(0, 10)); setRefreshing(false); }