From 4129134bc24d66ed0b4f6aea1e09a140e2edd059 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 12 Feb 2022 23:29:37 +0200 Subject: [PATCH] Looking columns mapped --- app/routes/play/looking.tsx | 83 +++++++++++++++---------------------- 1 file changed, 33 insertions(+), 50 deletions(-) diff --git a/app/routes/play/looking.tsx b/app/routes/play/looking.tsx index 19d3ba48b..85315f019 100644 --- a/app/routes/play/looking.tsx +++ b/app/routes/play/looking.tsx @@ -331,6 +331,17 @@ export default function LookingPage() { } const lookingForMatch = data.ownGroup.members?.length === LFG_GROUP_FULL_SIZE; + + const columns = [ + { type: "LIKES_GIVEN", groups: data.likedGroups, title: "Liked" }, + { type: "NEUTRAL", groups: data.neutralGroups, title: "Neutral" }, + { + type: "LIKES_RECEIVED", + groups: data.likerGroups, + title: "Likes received", + }, + ] as const; + return (

-
-

You want to play with

-
- {data.likedGroups.map((group) => { - return ( - - ); - })} + {columns.map((column) => ( +
+

{column.title}

+
+ {column.groups.map((group) => { + return ( + + ); + })} +
-
-
-

Groups

-
- {data.neutralGroups.map((group) => { - return ( - - ); - })} -
-
-
-

Want to play with you

-
- {data.likerGroups.map((group) => { - return ( - - ); - })} -
-
+ ))}
);