Skip to content

Commit

Permalink
renamed to generic method
Browse files Browse the repository at this point in the history
  • Loading branch information
KalliSfak committed Apr 26, 2024
1 parent 98a0931 commit 8758aff
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -124,7 +122,7 @@ export const useAddElementDialog = (addElementFunction: AddCardElement) => {
isDialogOpen,
elementTypeOptions,
onElementClick,
showCollaborativeTextEditorNotification,
showNotificationByElementType,
showCustomNotifier,
};
};

0 comments on commit 8758aff

Please sign in to comment.