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({ if (shouldCreateUser) {
type: 'user.signedUp', appEvents.emit({
payload: { type: 'user.signedUp',
method: 'magiclink', payload: {
}, method: 'magiclink',
}); },
});
}
}; };
toast.promise(promise, { toast.promise(promise, {