fix: remove duplicate API call

This commit is contained in:
Apoorv Mishra committed 2024-08-08 15:16:17 +05:30
1 parent a224d9bd98
commit 1483a7e7e4
2 files changed
+1 -3

No files matched your search

+1 -2
View File
@@ -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]);
@@ -53,7 +53,6 @@ function Collections() {
<Header id="collections" title={t("Collections")}>
<Relative>
<PaginatedList
fetch={collections.fetchPage}
options={params}
aria-label={t("Collections")}
items={collections.orderedData}