diff --git a/002_source/cms/src/components/dashboard/overview/app-usage.tsx b/002_source/cms/src/components/dashboard/overview/app-usage.tsx index 3773df4..b728969 100644 --- a/002_source/cms/src/components/dashboard/overview/app-usage.tsx +++ b/002_source/cms/src/components/dashboard/overview/app-usage.tsx @@ -9,6 +9,7 @@ import Divider from '@mui/material/Divider'; import Paper from '@mui/material/Paper'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; +import { useTranslation } from 'react-i18next'; import { Bar, BarChart, CartesianGrid, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; import { NoSsr } from '@/components/core/no-ssr'; @@ -23,11 +24,12 @@ export interface AppUsageProps { } export function AppUsage({ data }: AppUsageProps): React.JSX.Element { + const { t } = useTranslation(); const chartHeight = 300; return ( - + @@ -36,11 +38,11 @@ export function AppUsage({ data }: AppUsageProps): React.JSX.Element { +28% - increase in app usage with{' '} + {t('increase_in_app_usage_with')}{' '} 6,521 {' '} - new products purchased + {t('new_products_purchased')}
@@ -48,7 +50,7 @@ export function AppUsage({ data }: AppUsageProps): React.JSX.Element { This year {' '} - is forecasted to increase in your traffic by the end of the current month + {t('is_forecasted_to_increase_in_your_traffic_by_the_end_of_the_current_month')}
@@ -108,6 +110,7 @@ interface TooltipContentProps { } function TooltipContent({ active, payload }: TooltipContentProps): React.JSX.Element | null { + const { t } = useTranslation(); if (!active) { return null; } diff --git a/002_source/cms/src/components/dashboard/overview/events.tsx b/002_source/cms/src/components/dashboard/overview/events.tsx index 4a1ed2c..8c22946 100644 --- a/002_source/cms/src/components/dashboard/overview/events.tsx +++ b/002_source/cms/src/components/dashboard/overview/events.tsx @@ -1,3 +1,5 @@ +'use client'; + import * as React from 'react'; import Avatar from '@mui/material/Avatar'; import Box from '@mui/material/Box'; @@ -16,6 +18,7 @@ import Typography from '@mui/material/Typography'; import { ArrowRight as ArrowRightIcon } from '@phosphor-icons/react/dist/ssr/ArrowRight'; import { CalendarBlank as CalendarBlankIcon } from '@phosphor-icons/react/dist/ssr/CalendarBlank'; import { DotsThree as DotsThreeIcon } from '@phosphor-icons/react/dist/ssr/DotsThree'; +import { useTranslation } from 'react-i18next'; import { dayjs } from '@/lib/dayjs'; @@ -27,6 +30,7 @@ export interface Event { } export function Events({ events }: EventsProps): React.JSX.Element { + const { t } = useTranslation(); return ( } - subheader="Based on the linked bank accounts" - title="Upcoming events" + subheader={t('Based on the linked bank accounts')} + title={t('Upcoming events')} /> @@ -53,7 +57,7 @@ export function Events({ events }: EventsProps): React.JSX.Element { @@ -65,6 +69,7 @@ export interface EventItemProps { } function EventItem({ event }: EventItemProps): React.JSX.Element { + const { t } = useTranslation(); return ( @@ -85,12 +90,12 @@ function EventItem({ event }: EventItemProps): React.JSX.Element { disableTypography primary={ - {event.title} + {t(event.title)} } secondary={ - {event.description} + {t(event.description)} } />