Add context to removing notices
After refactoring are notices created in the context 'email-editor', but calling removing notices were not updated. [MAILPOET-6007]
This commit is contained in:
committed by
Rostislav Wolný
parent
4f7268e364
commit
0eeb74b58c
@@ -32,7 +32,7 @@ export function EditorNotices() {
|
||||
<NoticeList
|
||||
notices={dismissibleNotices}
|
||||
className="components-editor-notices__dismissible"
|
||||
onRemove={removeNotice}
|
||||
onRemove={(id) => removeNotice(id, 'email-editor')}
|
||||
/>
|
||||
<ValidationNotices />
|
||||
</>
|
||||
|
@@ -20,7 +20,7 @@ export function EditorSnackbars() {
|
||||
<SnackbarList
|
||||
notices={snackbarNotices}
|
||||
className="components-editor-notices__snackbar"
|
||||
onRemove={removeNotice}
|
||||
onRemove={(id) => removeNotice(id, 'email-editor')}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@@ -100,6 +100,7 @@ declare module '@wordpress/notices' {
|
||||
};
|
||||
selectors: {
|
||||
getNotices(state: unknown, context?: string): Notice[];
|
||||
removeNotice(id: string, context?: string): void;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user