From 332b75a85b0c829ce5cd1ac6b0211d64ba96fb1e Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 26 Jun 2024 16:42:41 -0400 Subject: [PATCH] Improve Recommendations layout --- src/app/_content/Recommendations.tsx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/app/_content/Recommendations.tsx b/src/app/_content/Recommendations.tsx index 47cc95d..69db33e 100644 --- a/src/app/_content/Recommendations.tsx +++ b/src/app/_content/Recommendations.tsx @@ -31,12 +31,13 @@ export default function Recommendations() { }, [api, current]) const carouselButtonClassName = "relative top-0 left-0 right-0 translate-x-0 translate-y-0" + const renderRecommendation = ( recommendation: RecommendationType, index: number, ) => ( -
+
@@ -59,7 +60,7 @@ export default function Recommendations() { {recommendation.relationship}
-
+
@@ -131,14 +132,22 @@ export default function Recommendations() { ) } + const renderAvatars = ( +
+ {recommendations.map(renderAvatarButtons)} +
+ ) + const renderRecommendations = ( +
+ + +
+ {renderAvatars} {recommendations.map(renderRecommendation)} -
- {recommendations.map(renderAvatarButtons)} -
) @@ -149,7 +158,7 @@ export default function Recommendations() { )} >
-
+
{data.recommendations.attributes.title}