From 43f52a9dcdbac748c476bbb98b849e83b790e2f7 Mon Sep 17 00:00:00 2001 From: sylenien Date: Fri, 10 Jun 2022 14:51:01 +0200 Subject: [PATCH] fix(ui): fix couple ui bugs --- .../components/DashboardEditModal/DashboardEditModal.tsx | 5 +---- .../components/SavedSearchModal/SavedSearchModal.tsx | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/app/components/Dashboard/components/DashboardEditModal/DashboardEditModal.tsx b/frontend/app/components/Dashboard/components/DashboardEditModal/DashboardEditModal.tsx index 9590a2ed4..c08ff12fb 100644 --- a/frontend/app/components/Dashboard/components/DashboardEditModal/DashboardEditModal.tsx +++ b/frontend/app/components/Dashboard/components/DashboardEditModal/DashboardEditModal.tsx @@ -27,9 +27,6 @@ function DashboardEditModal(props: Props) { }, []) const write = ({ target: { value, name } }) => dashboard.update({ [ name ]: value }) - const writeOption = (e, { checked, name }) => { - dashboard.update({ [name]: checked }); - } return useObserver(() => ( @@ -80,7 +77,7 @@ function DashboardEditModal(props: Props) { className="font-medium mr-3" type="checkbox" checked={ dashboard.isPublic } - onClick={ writeOption } + onClick={ () => dashboard.update({ 'isPublic': !dashboard.isPublic }) } />
dashboard.update({ 'isPublic': !dashboard.isPublic }) }> diff --git a/frontend/app/components/shared/SavedSearch/components/SavedSearchModal/SavedSearchModal.tsx b/frontend/app/components/shared/SavedSearch/components/SavedSearchModal/SavedSearchModal.tsx index 3ee47d379..a90193dc8 100644 --- a/frontend/app/components/shared/SavedSearch/components/SavedSearchModal/SavedSearchModal.tsx +++ b/frontend/app/components/shared/SavedSearch/components/SavedSearchModal/SavedSearchModal.tsx @@ -81,7 +81,7 @@ function SavedSearchModal(props: Props) {
)} {shownItems.map(item => ( -
onClick(item, e)}> +
onClick(item, e)}>
{item.name}