Open
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the change password page to enhance user experience by introducing logic to extract a classCode from the user's email and incorporate it into navigation post-password change.
- Added an onMount hook to retrieve the user's profile and extract a classCode from their email.
- Updated the post-password change navigation logic to conditionally append the classCode as a query parameter.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the
src/routes/profile/change-password/+page.sveltefile to enhance user experience by introducing logic to handle aclassCodefor navigation and improve user context during the password change process.Enhancements to user experience:
onMountlogic to retrieve and processclassCode: TheonMountlifecycle function now fetches the user's profile using thegetUserutility and extracts aclassCodefrom the user's email domain if available. ([src/routes/profile/change-password/+page.svelteR6-R24](https://github.com/hinagiku-dev/Hinagiku/pull/298/files#diff-2ed60c2b9a8230da8752f8357bea68163cc9ac7af001e10afc8b908481fa0260R6-R24))classCodeis present, it is converted to uppercase and appended as a query parameter to the/loginroute for improved contextual navigation. ([src/routes/profile/change-password/+page.svelteR57-R60](https://github.com/hinagiku-dev/Hinagiku/pull/298/files#diff-2ed60c2b9a8230da8752f8357bea68163cc9ac7af001e10afc8b908481fa0260R57-R60))