Skip to content
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

#539 Chris/add user settings #544

Merged
merged 33 commits into from
Oct 17, 2024
Merged

#539 Chris/add user settings #544

merged 33 commits into from
Oct 17, 2024

Conversation

chris-nowicki
Copy link
Contributor

@chris-nowicki chris-nowicki commented Sep 18, 2024

fixes #539

NOTE: This is a branch off my password reset branch which is why it shows so many files changed.

  • users can now navigate to settings using the navdrawer and update their email and/or password.
  • if the user forgot their OLD PASSWORD they can click on the recover link in the form. When they click the link it will log them out and route them to /recover-password.

SCREENSHOT

CleanShot_2024-09-18_at_17 08 32

Copy link

appwrite bot commented Sep 18, 2024

Gridiron Survivor Application 6616ea581ef9f5521c7d

Function ID Status Action
Your function has been successfully deployed.

Project name: Gridiron Survivor Application
Project ID: 6616ea581ef9f5521c7d

Function ID Status Action
Update User Email 66e9e91800219e84e954 ready Ready View Logs
Your function has been successfully deployed.

Project name: Gridiron Survivor Application
Project ID: 6616ea581ef9f5521c7d

Function ID Status Action
userAuth 6626fef885a9f630442b ready Ready View Logs

Only deployments on the production branch are activated automatically. If you'd like to activate this deployment, navigate to your deployments. Learn more about Appwrite Function deployments.

💡 Did you know?
Cursor pagination performs better than offset pagination when loading further pages

Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gridiron-survivor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2024 8:39pm
gridiron-survivor-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2024 8:39pm

} catch (error) {
console.error(error);
throw new Error('Error logging out user');
console.error('Password reset failed:', error);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Please review.

},
);
} catch (error) {
console.error('Error updating user email:', error);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked Vercel's error logging. We should remove console.errors because the REST calls should be caught automatically already. Therefore, we dont need console.error.


form.reset({ oldPassword: '', newPassword: '' });
} catch (error) {
console.error('Password Update Failed', error);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we need this since vercel will pick up all REST api responses already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ resolved all the above comments.

<p className="text-sm">
This will update the password for your account login. If you
forgot your password you can{' '}
<a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use component here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated using the built in Next Link component as that is what we use when linking to a specific route in the application. Otherwise we use LinkCustom for external links.

</LinkCustom>
</div>
<Heading
as="h2"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

H1 if it's the main title.

Comment on lines 94 to 95
const drawerTrigger = screen.getByTestId('drawer-trigger');
fireEvent.click(drawerTrigger);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should really only create a var if it's being reused. Otherwise, it's overkill.

@shashilo
Copy link
Collaborator

@ryandotfurrer For all the CSS request in this PR, create a new ticket for the UXE team. There are no designs for this, so these are considered nit comments.

Copy link
Member

@ryandotfurrer ryandotfurrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@ryandotfurrer
Copy link
Member

@ryandotfurrer For all the CSS request in this PR, create a new ticket for the UXE team. There are no designs for this, so these are considered nit comments.

@shashilo done, here is the issue: https://github.com/orgs/LetsGetTechnical/projects/2/views/5?pane=issue&itemId=83698866&issue=LetsGetTechnical%7Cgridiron-survivor%7C612

@shashilo shashilo requested a review from choir241 October 17, 2024 01:20
@shashilo shashilo enabled auto-merge (squash) October 17, 2024 01:20
@shashilo shashilo merged commit 05661c5 into develop Oct 17, 2024
5 checks passed
@shashilo shashilo deleted the chris/feature-user-settings branch October 17, 2024 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FEE: Create User Settings Page
6 participants