From b7590f119ca4ba5a498078b66c05bcd88441fae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Palma?= Date: Thu, 5 Sep 2024 18:53:30 +0100 Subject: [PATCH] fix: options are now horizontal --- .../planner/sidebar/OptionsController.tsx | 53 ++++++++++--------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/src/components/planner/sidebar/OptionsController.tsx b/src/components/planner/sidebar/OptionsController.tsx index cf535d82..7b73ca14 100644 --- a/src/components/planner/sidebar/OptionsController.tsx +++ b/src/components/planner/sidebar/OptionsController.tsx @@ -14,32 +14,35 @@ const OptionsController = () => { const { multipleOptions, selectedOption, setSelectedOption, setMultipleOptions } = useContext(MultipleOptionsContext); return ( - { - const prevId = multipleOptions[selectedOption].id; - setMultipleOptions(newMultipleOptions); - if (newMultipleOptions[selectedOption].id !== prevId) { - setSelectedOption(newMultipleOptions.findIndex((currentOption) => currentOption.id === prevId)); +
+ { + const prevId = multipleOptions[selectedOption].id; + setMultipleOptions(newMultipleOptions); + if (newMultipleOptions[selectedOption].id !== prevId) { + setSelectedOption(newMultipleOptions.findIndex((currentOption) => currentOption.id === prevId)); + } } - } - } - group="groupName" - animation={200} - delay={2} - multiDrag - onEnd={() => { - AnalyticsTracker.trackFeature(Feature.OPTION_REORDER); - }} - > - {multipleOptions.map((option: Option) => ( - currentOption.id === option.id)} - option={option} - /> - ))} - + } + group="groupName" + animation={200} + delay={2} + multiDrag + onEnd={() => { + AnalyticsTracker.trackFeature(Feature.OPTION_REORDER); + }} + > + {multipleOptions.map((option: Option) => ( + currentOption.id === option.id)} + option={option} + /> + ))} + +
) }