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{' '} - { - setIsCreatingRoadmap(true); - }} - className="rounded text-blue-600 underline" - > - create your own roadmap - - - - + <> + {isCreatingRoadmap && ( + { + setIsCreatingRoadmap(false); + }} + /> + )} + + + + + + Community Roadmaps + + + Browse the roadmaps created by the community or{' '} + { + setIsCreatingRoadmap(true); + }} + className="rounded text-blue-600 underline" + > + create your own roadmap + + + + + + + + + { + setPageState({ + ...pageState, + searchTerm: value, + currentPage: 1, + }); + }} + /> + + { + setPageState({ + ...pageState, + sortBy, + }); + }} + /> - - - - { - }} - /> - - { - setPageState({ - ...pageState, - sortBy, - }); - }} - /> - - - {loadingIndicator} - {roadmaps.length === 0 && !isLoading && } - {roadmaps.length > 0 && !isLoading && ( - <> - - {roadmaps.map((roadmap) => { - const roadmapLink = `/r/${roadmap.slug}`; - const totalRatings = Object.keys( - roadmap.ratings?.breakdown || [], - ).reduce( - (acc: number, key: string) => - acc + roadmap.ratings.breakdown[key as any], - 0, - ); - return ( - - - - - {roadmap.title} - - - {roadmap.description} - - - - + + {loadingIndicator} + {roadmaps.length === 0 && !isLoading && } + {roadmaps.length > 0 && !isLoading && ( + <> + + {roadmaps.map((roadmap) => { + const roadmapLink = `/r/${roadmap.slug}`; + const totalRatings = Object.keys( + roadmap.ratings?.breakdown || [], + ).reduce( + (acc: number, key: string) => + acc + roadmap.ratings.breakdown[key as any], + 0, + ); + return ( + + + + + {roadmap.title} + + + {roadmap.description} + + + + - - {Intl.NumberFormat('en-US', { - notation: 'compact', - }).format(roadmap.topicCount)}{' '} + + {Intl.NumberFormat('en-US', { + notation: 'compact', + }).format(roadmap.topicCount)}{' '} - - - - - ); - })} - - - { - setPageState({ - ...pageState, - currentPage: page, - }); - }} + - > - )} - - - > + + + + ); + })} + + + { + setPageState({ + ...pageState, + currentPage: page, + }); + }} + /> + > + )} + + + > ); }
- Browse the roadmaps created by the community or{' '} - { - setIsCreatingRoadmap(true); - }} - className="rounded text-blue-600 underline" - > - create your own roadmap - -
+ Browse the roadmaps created by the community or{' '} + { + setIsCreatingRoadmap(true); + }} + className="rounded text-blue-600 underline" + > + create your own roadmap + +
- {roadmap.description} -
+ {roadmap.description} +