diff --git a/src/components/skillparam/index.tsx b/src/components/skillparam/index.tsx index 558c2f6..ce2cbaa 100644 --- a/src/components/skillparam/index.tsx +++ b/src/components/skillparam/index.tsx @@ -13,12 +13,17 @@ type Props = { const SkillParam = ({skillParam}: Props) => { const {t} = useTranslation(); const {colors} = useTheme(); + const description = + (skillParam.name ? `${skillParam.name?.en || skillParam.name?.ja}\n` : '') + + (Array.isArray(skillParam.description) + ? skillParam.description.map(d => d.en || d.ja).join('\n') + : skillParam.description + ? skillParam.description?.en || skillParam.description?.ja + : ''); return ( <> - - - + {skillParam.type === 'fieldEffect' && ( <> {t('stage-effect')} @@ -37,7 +42,7 @@ const SkillParam = ({skillParam}: Props) => { /> - {skillParam.description?.en || skillParam.description?.ja} + {description} {skillParam.descriptionExtra && ( {` (${ diff --git a/src/screens/stagegirldetail/index.tsx b/src/screens/stagegirldetail/index.tsx index 5001aca..107c421 100644 --- a/src/screens/stagegirldetail/index.tsx +++ b/src/screens/stagegirldetail/index.tsx @@ -11,8 +11,8 @@ import {useTranslation} from 'react-i18next'; import {Image, View} from 'react-native'; import FastImage from 'react-native-fast-image'; import { - Button, DataTable, + SegmentedButtons, Surface, Text, TouchableRipple, @@ -27,7 +27,9 @@ const StageGirlDetailScreen = ({ const [loading, setLoading] = useState(true); const [dress, setDress] = useState(null); const [character, setCharater] = useState(null); - const [tabIndex, setTabIndex] = useState(0); + const [tabIndex, setTabIndex] = useState<'stats' | 'info' | 'act_skill'>( + 'stats', + ); useEffect(() => { const loadData = async () => { @@ -67,10 +69,6 @@ const StageGirlDetailScreen = ({ id: character.basicInfo.charaID, }); - const onPressTabStats = () => setTabIndex(0); - const onPressTabInfo = () => setTabIndex(1); - const onPressTabSkill = () => setTabIndex(2); - return ( {dress && ( @@ -111,7 +109,7 @@ const StageGirlDetailScreen = ({ /> - + {t('cost')} {dress.base.cost} @@ -129,7 +127,7 @@ const StageGirlDetailScreen = ({ {releasedWW.format('LLLL')} )} - + {t('attack-type')} - - - - - - {tabIndex === 0 && ( + + {tabIndex === 'stats' && ( - - + + {t('power-score-total')} @@ -205,9 +190,9 @@ const StageGirlDetailScreen = ({ )} - {tabIndex === 1 && ( + {tabIndex === 'info' && ( - + {t('profile')} @@ -230,7 +215,7 @@ const StageGirlDetailScreen = ({ )} - {tabIndex === 2 && ( + {tabIndex === 'act_skill' && ( <> @@ -252,7 +237,7 @@ const StageGirlDetailScreen = ({ {t('unit-skill')} - + {autoSkill.type.en || autoSkill.type.ja} @@ -298,7 +283,7 @@ const StageGirlDetailScreen = ({ {t('finishing-act')} - +