From 8758affed2814356d15d016ee03a218a60c496ab Mon Sep 17 00:00:00 2001 From: KalliSfak Date: Fri, 26 Apr 2024 10:35:38 +0200 Subject: [PATCH] renamed to generic method --- .../feature/board/shared/AddElementDialog.composable.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/modules/feature/board/shared/AddElementDialog.composable.ts b/src/modules/feature/board/shared/AddElementDialog.composable.ts index b3e8ef3b26..4695a6654f 100644 --- a/src/modules/feature/board/shared/AddElementDialog.composable.ts +++ b/src/modules/feature/board/shared/AddElementDialog.composable.ts @@ -32,12 +32,10 @@ export const useAddElementDialog = (addElementFunction: AddCardElement) => { const elementData = await addElementFunction(elementType); lastCreatedElementId.value = elementData?.id; - showCollaborativeTextEditorNotification(elementType); + showNotificationByElementType(elementType); }; - const showCollaborativeTextEditorNotification = ( - elementType: ContentElementType - ) => { + const showNotificationByElementType = (elementType: ContentElementType) => { if (elementType === ContentElementType.CollaborativeTextEditor) { showCustomNotifier( t( @@ -124,7 +122,7 @@ export const useAddElementDialog = (addElementFunction: AddCardElement) => { isDialogOpen, elementTypeOptions, onElementClick, - showCollaborativeTextEditorNotification, + showNotificationByElementType, showCustomNotifier, }; };