From 4f6fa1d5c3230de3f3300e3a518dcd606bc53bfa Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Mon, 29 Jul 2024 19:20:28 +0600 Subject: [PATCH] fix: search --- .../DiscoverRoadmaps/DiscoverRoadmaps.tsx | 235 +++++++++--------- 1 file changed, 120 insertions(+), 115 deletions(-) diff --git a/src/components/DiscoverRoadmaps/DiscoverRoadmaps.tsx b/src/components/DiscoverRoadmaps/DiscoverRoadmaps.tsx index 9bc520c2c..62805fe1a 100644 --- a/src/components/DiscoverRoadmaps/DiscoverRoadmaps.tsx +++ b/src/components/DiscoverRoadmaps/DiscoverRoadmaps.tsx @@ -111,125 +111,130 @@ export function DiscoverRoadmaps(props: DiscoverRoadmapsProps) { const loadingIndicator = isLoading && ; return ( - <> - {isCreatingRoadmap && ( - { - setIsCreatingRoadmap(false); - }} - /> - )} - -
-
-
-

- Community Roadmaps -

-

- Browse the roadmaps created by the community or{' '} - -

-
-
+ <> + {isCreatingRoadmap && ( + { + setIsCreatingRoadmap(false); + }} + /> + )} + +
+
+
+

+ Community Roadmaps +

+

+ Browse the roadmaps created by the community or{' '} + +

+
+
+
+
+
+
+ { + setPageState({ + ...pageState, + searchTerm: value, + currentPage: 1, + }); + }} + /> + + { + setPageState({ + ...pageState, + sortBy, + }); + }} + />
-
-
-
- { - }} - /> - - { - setPageState({ - ...pageState, - sortBy, - }); - }} - /> -
- - {loadingIndicator} - {roadmaps.length === 0 && !isLoading && } - {roadmaps.length > 0 && !isLoading && ( - <> -
-
- +
+ + + ); + })} + + + { + setPageState({ + ...pageState, + currentPage: page, + }); + }} + /> + + )} + +
+ ); }