compromised-password-root.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import useWaitForI18n from '@/shared/hooks/use-wait-for-i18n'
  2. import { Button } from 'react-bootstrap'
  3. import { Trans, useTranslation } from 'react-i18next'
  4. export function CompromisedPasswordCard() {
  5. const { t } = useTranslation()
  6. const { isReady } = useWaitForI18n()
  7. if (!isReady) {
  8. return null
  9. }
  10. return (
  11. <div className="compromised-password">
  12. <div>
  13. <h3 className="compromised-password-header">
  14. {t('compromised_password')}
  15. </h3>
  16. <p>
  17. <Trans
  18. i18nKey="your_password_was_detected"
  19. components={[
  20. /* eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key */
  21. <a
  22. href="https://haveibeenpwned.com/passwords"
  23. target="_blank"
  24. rel="noreferrer"
  25. />,
  26. ]}
  27. />
  28. </p>
  29. <p>
  30. <Trans
  31. i18nKey="please_change_your_password_by_going_to_your_account_settings"
  32. /* eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key */
  33. components={[<a href="/user/settings" />]}
  34. />
  35. </p>
  36. </div>
  37. <Button className="btn-primary" href="/user/settings">
  38. {t('go_to_account_settings')}
  39. </Button>
  40. </div>
  41. )
  42. }