(
-
+
);
interface Levels {
@@ -190,6 +194,7 @@ export const HealthBar = ({
intent: Intent;
triggerRatio?: string;
}) => {
+ const t = useT();
const targetNumber = parseInt(target, 10);
const rangeLimit = targetNumber * 2;
@@ -220,7 +225,7 @@ export const HealthBar = ({
})}
>
{levels.map((p, index) => {
const { commitmentAmount, fee } = p;
@@ -253,11 +258,11 @@ export const HealthBar = ({
- t( 'Providers greater than 2x target stake not shown' )
+ {t('Providers greater than 2x target stake not shown')}
}
>
-
...
+
...
)}
diff --git a/libs/ui-toolkit/src/components/show-more/show-more.tsx b/libs/ui-toolkit/src/components/show-more/show-more.tsx
index 656a4582f..fbd31af9e 100644
--- a/libs/ui-toolkit/src/components/show-more/show-more.tsx
+++ b/libs/ui-toolkit/src/components/show-more/show-more.tsx
@@ -1,8 +1,8 @@
import classNames from 'classnames';
import { useRef, useState, useEffect } from 'react';
-import { t } from '@vegaprotocol/i18n';
import { Button } from '../button';
import type { ReactNode } from 'react';
+import { useT } from '../../use-t';
type ShowMoreProps = {
children: ReactNode;
@@ -15,6 +15,7 @@ export const ShowMore = ({
closedMaxHeightPx = 125,
overlayColourOverrides,
}: ShowMoreProps) => {
+ const t = useT();
const containerRef = useRef
(null);
const [expanded, setExpanded] = useState(false);
diff --git a/libs/ui-toolkit/src/components/theme-switcher/theme-switcher.tsx b/libs/ui-toolkit/src/components/theme-switcher/theme-switcher.tsx
index 1b065f75e..b0dc093e6 100644
--- a/libs/ui-toolkit/src/components/theme-switcher/theme-switcher.tsx
+++ b/libs/ui-toolkit/src/components/theme-switcher/theme-switcher.tsx
@@ -1,7 +1,7 @@
-import { t } from '@vegaprotocol/i18n';
import { useThemeSwitcher } from '@vegaprotocol/react-helpers';
import { SunIcon, MoonIcon } from './icons';
import { Toggle } from '../toggle';
+import { useT } from '../../use-t';
export const ThemeSwitcher = ({
className,
@@ -10,6 +10,7 @@ export const ThemeSwitcher = ({
className?: string;
withMobile?: boolean;
}) => {
+ const t = useT();
const { theme, setTheme } = useThemeSwitcher();
const button = (