Skip to content

Commit

Permalink
try setUpProfile() in <LoginWindow>
Browse files Browse the repository at this point in the history
This completes TODO overmind-xyz#4 in <LoginWindow>
  • Loading branch information
J Ko committed Nov 29, 2023
1 parent b91590e commit 2c07d15
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app/app/loginWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ export default function LoginWindow({
*/
const onSubmit = async (form: FormData) => {
setError('');
/*
TODO #4: Set up a try catch block to call the setUpProfile() function and set the error state
if an error is thrown

HINT:
- Use the setUpProfile() function to set up the user's profile and log them in
- In the catch block, set the error state to the error message (error.message)
*/
try {
await setUpProfile(form);
} catch (error: any) {
setError(error.message);
}
};

return (
Expand Down

0 comments on commit 2c07d15

Please sign in to comment.