Sentry: unset the Sentry account when appropriate

This commit is contained in:
Alex Gleason
2023-10-12 21:56:14 -05:00
parent e2b8a74e91
commit b2c766c8ce
2 changed files with 11 additions and 1 deletions

View File

@ -53,4 +53,10 @@ async function setSentryAccount(account: Account) {
});
}
export { startSentry, setSentryAccount };
/** Remove the account from Sentry events. */
async function unsetSentryAccount() {
const Sentry = await import('@sentry/react');
Sentry.setUser(null);
}
export { startSentry, setSentryAccount, unsetSentryAccount };