Skip to content

Commit

Permalink
add a navigation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-solo committed Nov 19, 2024
1 parent d69fa8d commit ab0a676
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/Stepper/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
// import PropTypes from "prop-types";
import React from 'react'
import { WebTranslations } from '../../i18n/web'
import { Button } from '../Forms/Button'
import { useTranslation } from '../Hooks'

// Stepper props
export interface StepperProps {
Expand All @@ -24,6 +26,7 @@ export interface StepperProps {
}

export function Stepper(props: StepperProps) {
const tsln = useTranslation<WebTranslations>()
return (
<div className="pt-3 pb-6 sm:pb-40">
<div>
Expand Down Expand Up @@ -61,6 +64,9 @@ export function Stepper(props: StepperProps) {
</div>
)}
</div>
{props.activeStep === 1 && (
<p className="mt-[24px]">{tsln.stepper.navWarning}</p>
)}
</div>
</div>
)
Expand Down
1 change: 1 addition & 0 deletions i18n/web/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ const en: WebTranslations = {
previousStep: 'Previous',
nextStep: 'Next',
getEstimate: 'Estimate my benefits',
navWarning: `Note: Please navigate using the "Previous" and "Next" buttons. Using your browser's navigation buttons is not recommended.`,
},
datePicker: {
month: 'Month',
Expand Down
1 change: 1 addition & 0 deletions i18n/web/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ const fr: WebTranslations = {
nextStep: 'Suivant',
previousStep: 'Précédent',
getEstimate: 'Estimer mes prestations',
navWarning: `Note: Veuillez naviguer en utilisant les boutons «Précédent» et «Suivant». Il n’est pas recommandé d’utiliser les boutons de votre navigateur.`,
},
datePicker: {
month: 'Mois',
Expand Down
1 change: 1 addition & 0 deletions i18n/web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export type WebTranslations = {
nextStep: string
previousStep: string
getEstimate: string
navWarning: string
}
//Date Picker
datePicker: {
Expand Down

0 comments on commit ab0a676

Please sign in to comment.