Skip to content

Commit 85f8c27

Browse files
baevmkorvin89
andauthored
refactor(OnboardingMenu): use useTranslation hook for i18n (#356)
Co-authored-by: Mr.Dr.Professor Patrick <alaev89@yandex.ru>
1 parent 6d0c899 commit 85f8c27

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/OnboardingMenu/OnboardingMenu.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const OnboardingMenuParent = ({
5151
children,
5252
}: OnboardingMenuProps) => {
5353
const [isHovered, setIsHovered] = React.useState(false);
54+
const {t} = i18n.useTranslation();
5455

5556
const onMouseEnter = React.useCallback(() => {
5657
if (withCloseButton) {
@@ -150,15 +151,15 @@ const OnboardingMenuParent = ({
150151
onClick={onCollapseClickCallback}
151152
width="max"
152153
>
153-
{collapseButtonText ?? i18n('collapse')}
154+
{collapseButtonText ?? t('collapse')}
154155
</Button>
155156
<Button
156157
view="outlined-contrast"
157158
onClick={onCompleteClick}
158159
size="m"
159160
width="max"
160161
>
161-
{completeButtonText ?? i18n('complete')}
162+
{completeButtonText ?? t('complete')}
162163
</Button>
163164
</div>
164165
</React.Fragment>

0 commit comments

Comments
 (0)