From e4d5b8151802517b2943756fc0d09ffa95e2c4e2 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 29 Jan 2022 18:21:37 +0100 Subject: chore: replace lingui functions with react-intl --- src/components/SearchForm/SearchForm.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/components/SearchForm/SearchForm.tsx') 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(null); const router = useRouter(); @@ -27,7 +28,12 @@ const SearchForm = ({ isOpened }: { isOpened: boolean }) => { return ( <> -
{t`Search`}
+
+ {intl.formatMessage({ + defaultMessage: 'Search', + description: 'SearchForm : form title', + })} +
{ /> - {t`Search`} + + {intl.formatMessage({ + defaultMessage: 'Search', + description: 'SearchForm: search button text', + })} +
-- cgit v1.2.3