compromised-password-root.tsx 1.0 KB

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