Only emit sign up event when the property "shouldCreateUser" is truthy

This commit is contained in:
gbuomprisco
2024-09-06 18:37:09 +02:00
parent 117602ac5e
commit b32b0939b1

View File

@@ -77,12 +77,14 @@ export function MagicLinkAuthContainer({
},
});
appEvents.emit({
type: 'user.signedUp',
payload: {
method: 'magiclink',
},
});
if (shouldCreateUser) {
appEvents.emit({
type: 'user.signedUp',
payload: {
method: 'magiclink',
},
});
}
};
toast.promise(promise, {