From 759c9065067b92113f2d4bd33eba74180638c70a Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Fri, 24 Mar 2023 18:17:49 +0100 Subject: [PATCH] feat(frontend): deactivate delete note button if user is not owner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This button and its functionality only works if the user is the owner, so it doesn't make sense to make it possible to press it otherwise… Signed-off-by: Philip Molares --- .../deletion-moadal.test.tsx.snap | 42 +++++++++++++++++++ .../common/modals/deletion-moadal.test.tsx | 26 +++++++++++- .../common/modals/deletion-modal.tsx | 4 +- 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/common/modals/__snapshots__/deletion-moadal.test.tsx.snap b/frontend/src/components/common/modals/__snapshots__/deletion-moadal.test.tsx.snap index b8a166cf2..7c0a478b1 100644 --- a/frontend/src/components/common/modals/__snapshots__/deletion-moadal.test.tsx.snap +++ b/frontend/src/components/common/modals/__snapshots__/deletion-moadal.test.tsx.snap @@ -1,5 +1,47 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`DeletionModal disables deletion when user is not owner 1`] = ` + +`; + exports[`DeletionModal renders correctly with deletionButtonI18nKey 1`] = `