From 51ba38e4690830f0f82eddaafab4d5c4018c6da1 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sat, 17 Aug 2024 00:06:40 +0100 Subject: [PATCH] Fix styles for loading and pagination --- .../Projects/ListProjectSolutions.tsx | 44 +++++++------------ src/components/Projects/LoadingSolutions.tsx | 20 ++++++--- src/components/Projects/ProjectTabs.tsx | 2 +- 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/components/Projects/ListProjectSolutions.tsx b/src/components/Projects/ListProjectSolutions.tsx index 71a8194ef..5bdb48353 100644 --- a/src/components/Projects/ListProjectSolutions.tsx +++ b/src/components/Projects/ListProjectSolutions.tsx @@ -239,21 +239,7 @@ export function ListProjectSolutions(props: ListProjectSolutionsProps) {
{leavingRoadmapModal} - { - setPageState({ - ...pageState, - currentPage: page, - }); - }} - /> - -
+
{solutions?.data.map((solution, counter) => { const isVisited = alreadyVisitedSolutions[solution._id!]; const avatar = solution.user.avatar || ''; @@ -325,18 +311,22 @@ export function ListProjectSolutions(props: ListProjectSolutionsProps) { })}
- { - setPageState({ - ...pageState, - currentPage: page, - }); - }} - /> + {(solutions?.totalPages || 0) > 1 && ( +
+ { + setPageState({ + ...pageState, + currentPage: page, + }); + }} + /> +
+ )}
); } diff --git a/src/components/Projects/LoadingSolutions.tsx b/src/components/Projects/LoadingSolutions.tsx index 72b1734ea..b4a1fb080 100644 --- a/src/components/Projects/LoadingSolutions.tsx +++ b/src/components/Projects/LoadingSolutions.tsx @@ -1,11 +1,19 @@ export function LoadingSolutions() { return ( -