fix: delete current user in deleteUser mutation

This commit is contained in:
Ali BARIN
2023-03-02 23:46:20 +00:00
parent 399cebda70
commit 387a849269
4 changed files with 8 additions and 27 deletions

View File

@@ -27,13 +27,7 @@ export default function DeleteAccountDialog(props: TDeleteAccountDialogProps) {
const navigate = useNavigate();
const handleConfirm = React.useCallback(async () => {
await deleteUser({
variables: {
input: {
id: currentUser.id,
}
}
});
await deleteUser();
authentication.updateToken('');
await apolloClient.clearStore();