mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Allow account deletion from the user agreement page
This commit is contained in:
@@ -78,7 +78,7 @@ export function authenticate(
|
||||
sessionStorage.setItem(`stranger${newAccount.id}`, '1');
|
||||
}
|
||||
|
||||
if (auth && auth.oauth && auth.oauth.clientId) {
|
||||
if (auth?.oauth?.clientId) {
|
||||
// if we authenticating during oauth, we disable account chooser
|
||||
// because user probably has made his choise now
|
||||
// this may happen, when user registers, logs in or uses account
|
||||
|
||||
@@ -7,6 +7,7 @@ import Body from './AcceptRulesBody';
|
||||
const messages = defineMessages({
|
||||
title: 'User Agreement',
|
||||
declineAndLogout: 'Decline and logout',
|
||||
deleteAccount: 'Delete account',
|
||||
});
|
||||
|
||||
export default factory({
|
||||
@@ -17,7 +18,13 @@ export default factory({
|
||||
autoFocus: true,
|
||||
children: <Message key="accept" defaultMessage="Accept" />,
|
||||
},
|
||||
links: {
|
||||
label: messages.declineAndLogout,
|
||||
},
|
||||
links: [
|
||||
{
|
||||
label: messages.declineAndLogout,
|
||||
},
|
||||
{
|
||||
label: messages.deleteAccount,
|
||||
payload: { deleteAccount: true },
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user