Skip to content

Commit

Permalink
chore: translatedを定義
Browse files Browse the repository at this point in the history
  • Loading branch information
AtsushiM committed Feb 17, 2025
1 parent e83c032 commit 139760b
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ const ActualReleaseNote: FC<{
data: HeaderProps['releaseNote']
}> = () => {
const translate = useTranslate()
const translated = useMemo(
() => ({
error: translate('common/releaseNotesLoadError'),
seeAll: translate('common/seeAllReleaseNotes'),
}),
[translate],
)

const classNames = useMemo(() => {
const { anchor, icon, indexLinkWrapper, indexLinkAnchor } = classNameGenerator()
Expand All @@ -53,7 +60,7 @@ const ActualReleaseNote: FC<{
</Center>
) : data.error ? (
<Text>
<Translate>{translate('common/releaseNotesLoadError')}</Translate>
<Translate>{translated.error}</Translate>
</Text>
) : (
<Stack>
Expand All @@ -80,7 +87,7 @@ const ActualReleaseNote: FC<{
rel="noopener noreferrer"
className={classNames.indexLinkAnchor}
>
<Translate>{translate('common/seeAllReleaseNotes')}</Translate>
<Translate>{translated.seeAll}</Translate>
<FaUpRightFromSquareIcon className={classNames.icon} />
</a>
</div>
Expand Down

0 comments on commit 139760b

Please sign in to comment.