diff options
Diffstat (limited to 'src/components/SearchForm/SearchForm.tsx')
| -rw-r--r-- | src/components/SearchForm/SearchForm.tsx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/components/SearchForm/SearchForm.tsx b/src/components/SearchForm/SearchForm.tsx index cefda85..38ae60d 100644 --- a/src/components/SearchForm/SearchForm.tsx +++ b/src/components/SearchForm/SearchForm.tsx @@ -1,12 +1,13 @@ import { ButtonSubmit } from '@components/Buttons'; import { Form, Input } from '@components/Form'; import { SearchIcon } from '@components/Icons'; -import { t } from '@lingui/macro'; import { useRouter } from 'next/router'; import { FormEvent, useEffect, useRef, useState } from 'react'; +import { useIntl } from 'react-intl'; import styles from './SearchForm.module.scss'; const SearchForm = ({ isOpened }: { isOpened: boolean }) => { + const intl = useIntl(); const [query, setQuery] = useState(''); const inputRef = useRef<HTMLInputElement>(null); const router = useRouter(); @@ -27,7 +28,12 @@ const SearchForm = ({ isOpened }: { isOpened: boolean }) => { return ( <> - <div className={styles.title}>{t`Search`}</div> + <div className={styles.title}> + {intl.formatMessage({ + defaultMessage: 'Search', + description: 'SearchForm : form title', + })} + </div> <Form submitHandler={launchSearch} modifier="search"> <Input ref={inputRef} @@ -39,7 +45,12 @@ const SearchForm = ({ isOpened }: { isOpened: boolean }) => { /> <ButtonSubmit modifier="search"> <SearchIcon /> - <span className="screen-reader-text">{t`Search`}</span> + <span className="screen-reader-text"> + {intl.formatMessage({ + defaultMessage: 'Search', + description: 'SearchForm: search button text', + })} + </span> </ButtonSubmit> </Form> </> |
