From ff3e5259b2b6c03c0a0b4e4d33b029aeb7070bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anne=20L=27H=C3=B4te?= Date: Thu, 9 Nov 2023 11:29:59 +0100 Subject: [PATCH] refactor(ui): Refactor actions buttons --- client/src/pages/home/index.jsx | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/client/src/pages/home/index.jsx b/client/src/pages/home/index.jsx index bbddd3df..2504ba26 100644 --- a/client/src/pages/home/index.jsx +++ b/client/src/pages/home/index.jsx @@ -247,30 +247,14 @@ export default function Home() { setSelectedAffiliations([]); }; - const renderAffiliationsButtons = (selected) => ( + const renderButtons = (selected, fn) => ( <> {Object.values(status).map((st) => ( - ))} - - ); - - const renderWorksButtons = (selected) => ( - <> - {Object.values(status).map((st) => ( -