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/Widgets/ToC/ToC.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/components/Widgets/ToC/ToC.tsx') diff --git a/src/components/Widgets/ToC/ToC.tsx b/src/components/Widgets/ToC/ToC.tsx index 6010354..c499478 100644 --- a/src/components/Widgets/ToC/ToC.tsx +++ b/src/components/Widgets/ToC/ToC.tsx @@ -1,11 +1,15 @@ import { ExpandableWidget, OrderedList } from '@components/WidgetParts'; -import { t } from '@lingui/macro'; import { Heading } from '@ts/types/app'; import useHeadingsTree from '@utils/hooks/useHeadingsTree'; +import { useIntl } from 'react-intl'; const ToC = () => { + const intl = useIntl(); const headingsTree = useHeadingsTree('article'); - const title = t`Table of contents`; + const title = intl.formatMessage({ + defaultMessage: 'Table of contents', + description: 'ToC: widget title', + }); const getItems = (headings: Heading[]) => { return headings.map((heading) => { -- cgit v1.2.3