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

feat: add email verification pages #57

Merged
merged 6 commits into from
Dec 16, 2024

Conversation

Chisomchima
Copy link
Member

@Chisomchima Chisomchima commented Dec 3, 2024

Implements DHIS2-18375


Description

This PR introduces two pages within the Login app to provide feedback on the status of email verification for users:

  1. Email Verification Success Page

    • Displays a confirmation message informing users that their email was successfully verified.
    • Provides a link to navigate to the system's start screen.
  2. Email Verification Error Page

    • Displays an error message indicating that the email verification failed.
    • Provides a link to navigate to the User Profile app for further action.

The functionality aims to improve the user experience by providing clear and actionable feedback on email verification attempts.


Screenshots

Email Verification Success Page

Screenshot 2024-12-03 at 10 34 55

Email Verification Error Page

Screenshot 2024-12-03 at 10 34 35

@Chisomchima Chisomchima requested a review from tomzemp December 3, 2024 09:36
Copy link
Member

@tomzemp tomzemp left a comment

Choose a reason for hiding this comment

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

Looks good 🎉.

I've left some comments to clean up some styling points.

We also need to wrap the strings in i18n.t function for translations.

In the login app, this happens slightly differently (because we allow you to change the language without reloading the page), so you need to get a list of languages and then pass them to the translation function as options, e.g.

const MyComponent = () => {
const {lngs} = useLoginConfig()
return (<p>{i18n.t('This is my text,{lngs})}</p>
}

src/pages/email-verification-failure.js Outdated Show resolved Hide resolved
src/pages/login.module.css Outdated Show resolved Hide resolved
src/pages/email-verification-failure.js Outdated Show resolved Hide resolved
src/pages/email-verification-failure.js Outdated Show resolved Hide resolved
@Chisomchima Chisomchima requested a review from tomzemp December 10, 2024 09:47
Copy link
Member

@tomzemp tomzemp left a comment

Choose a reason for hiding this comment

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

lgtm 🚀

@Chisomchima Chisomchima merged commit dbbd781 into main Dec 16, 2024
6 checks passed
@dhis2-bot
Copy link
Collaborator

🎉 This PR is included in version 100.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants