fix: Adjust telemetry from canvas (no-changelog) (#8252)
This commit is contained in:
@@ -407,11 +407,11 @@ export const listenForCredentialChanges = (opts: {
|
||||
onCredentialCreated?: (credential: ICredentialsResponse) => void;
|
||||
onCredentialUpdated?: (credential: ICredentialsResponse) => void;
|
||||
onCredentialDeleted?: (credentialId: string) => void;
|
||||
}): void => {
|
||||
}) => {
|
||||
const { store, onCredentialCreated, onCredentialDeleted, onCredentialUpdated } = opts;
|
||||
const listeningForActions = ['createNewCredential', 'updateCredential', 'deleteCredential'];
|
||||
|
||||
store.$onAction((result) => {
|
||||
return store.$onAction((result) => {
|
||||
const { name, after, args } = result;
|
||||
after(async (returnValue) => {
|
||||
if (!listeningForActions.includes(name)) {
|
||||
|
||||
@@ -629,11 +629,11 @@ export const listenForModalChanges = (opts: {
|
||||
store: UiStore;
|
||||
onModalOpened?: (name: keyof Modals) => void;
|
||||
onModalClosed?: (name: keyof Modals) => void;
|
||||
}): void => {
|
||||
}) => {
|
||||
const { store, onModalClosed, onModalOpened } = opts;
|
||||
const listeningForActions = ['openModal', 'openModalWithData', 'closeModal'];
|
||||
|
||||
store.$onAction((result) => {
|
||||
return store.$onAction((result) => {
|
||||
const { name, after, args } = result;
|
||||
after(async () => {
|
||||
if (!listeningForActions.includes(name)) {
|
||||
|
||||
Reference in New Issue
Block a user