From 1483a7e7e4b1ee48ffd91a7e46162ff8eeed520c Mon Sep 17 00:00:00 2001 From: Apoorv Mishra Date: Thu, 8 Aug 2024 15:16:17 +0530 Subject: [PATCH] fix: remove duplicate API call --- app/components/Sidebar/App.tsx | 3 +-- app/components/Sidebar/components/Collections.tsx | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/components/Sidebar/App.tsx b/app/components/Sidebar/App.tsx index 1b5f1513bc..8ea1561338 100644 --- a/app/components/Sidebar/App.tsx +++ b/app/components/Sidebar/App.tsx @@ -5,7 +5,6 @@ import { DndProvider } from "react-dnd"; import { HTML5Backend } from "react-dnd-html5-backend"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; -import { Pagination } from "@shared/constants"; import Flex from "~/components/Flex"; import Scrollable from "~/components/Scrollable"; import Text from "~/components/Text"; @@ -43,7 +42,7 @@ function AppSidebar() { React.useEffect(() => { if (!user.isViewer) { void documents.fetchDrafts(); - void collections.fetchPage({ limit: Pagination.maxLimit }); + void collections.fetchAll(); } }, [documents, collections, user.isViewer]); diff --git a/app/components/Sidebar/components/Collections.tsx b/app/components/Sidebar/components/Collections.tsx index 0c3d3b77e4..1b5419b31d 100644 --- a/app/components/Sidebar/components/Collections.tsx +++ b/app/components/Sidebar/components/Collections.tsx @@ -53,7 +53,6 @@ function Collections() {