From c15d9528dcc317ca3161af5959647a718ad818d6 Mon Sep 17 00:00:00 2001 From: Harum Helmy Date: Thu, 30 Jul 2020 11:26:53 -0400 Subject: [PATCH] added pagination functionality to dashboard --- src/components/dashboard.js | 52 ++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/components/dashboard.js b/src/components/dashboard.js index 2093117..cf84a94 100644 --- a/src/components/dashboard.js +++ b/src/components/dashboard.js @@ -53,7 +53,7 @@ export default function Dashboard() { useEffect(() => { if (location.search === "") { - history.replace({ search: "q=COVID-19" }) // add an OR query here too + history.replace({ search: "q=COVID-19" }) } }, [apiQs]); @@ -373,41 +373,41 @@ export default function Dashboard() { )) : null} )} - - -
- {!!(location.state && location.state.bookmark) && ( - - )} - {/* Cloudant returns the same bookmark when it hits the end of the list */} - {!!( - preprints.rows.length < preprints.total_rows && - preprints.bookmark !== (location.state && location.state.bookmark) - ) && ( +
+
+ {!!(location.state && location.state.bookmark) && ( )} -
+ {/* Cloudant returns the same bookmark when it hits the end of the list */} + {!!( + preprints.rows.length < preprints.total_rows && + preprints.bookmark !== (location.state && location.state.bookmark) + ) && ( + + )} +
+