From d16565332e90fa39594440f0d365e9ac759ef778 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 4 Mar 2022 17:56:46 -0800 Subject: [PATCH] Localize PartySegmentedControl --- components/PartySegmentedControl/index.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/components/PartySegmentedControl/index.tsx b/components/PartySegmentedControl/index.tsx index b761f929..5a67e268 100644 --- a/components/PartySegmentedControl/index.tsx +++ b/components/PartySegmentedControl/index.tsx @@ -1,5 +1,6 @@ import React from 'react' -import './index.scss' +import { useSnapshot } from 'valtio' +import { useTranslation } from 'next-i18next' import { appState } from '~utils/appState' @@ -8,7 +9,9 @@ import Segment from '~components/Segment' import ToggleSwitch from '~components/ToggleSwitch' import { GridType } from '~utils/enums' -import { useSnapshot } from 'valtio' + + +import './index.scss' interface Props { selectedTab: GridType @@ -17,6 +20,8 @@ interface Props { } const PartySegmentedControl = (props: Props) => { + const { t } = useTranslation('common') + const { party, grid } = useSnapshot(appState) function getElement() { @@ -62,21 +67,21 @@ const PartySegmentedControl = (props: Props) => { name="characters" selected={props.selectedTab == GridType.Character} onClick={props.onClick} - >Characters + >{t('party.segmented_control.characters')} Weapons + >{t('party.segmented_control.weapons')} Summons + >{t('party.segmented_control.summons')} {