-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created Modal in ProfileForm.tsx, added profile deletion from firebas… #230
Conversation
…e functionality to deleteUser endpoint in views.tsx and created a BigRed Variety for buttons in Button.tsx
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi guys, great work on this!
I have added a few comments that need addressing. Please check them out and let me know if there are any questions
}, | ||
retry: false, | ||
onSuccess: () => { | ||
console.log("DELETED"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove log
} = useForm<DeleteAccountFormValues>(); | ||
|
||
//changeUserStatus handles deleting user from prisma and firebase | ||
const { mutateAsync: changeUserStatus, error: changeUserStatusError } = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use appropriate naming patterns. I don't think changeUserStatus
is the way
await changeUserStatus(); | ||
await handleSignOut(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap this in a try catch, it is possible that it fails and the user will need some feedback that the action failed
// const { mutateAsync: changeUserStatus } = useMutation({ | ||
// mutationFn: async () => { | ||
// const { data } = await api.delete(`/users/${userid}`); | ||
// return data; | ||
// }, | ||
// retry: false, | ||
// onSuccess: () => { | ||
// console.log("DELETED"); | ||
// } | ||
// }); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comments
H1 Account-Deletion-FullStack
Summary
Closes #207
Testing
Notes