mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Update i18next type
This commit is contained in:
@@ -16,7 +16,7 @@ const TimelineTranslate = () => {
|
||||
const { status, highlighted, rawContent, detectedLanguage } = useContext(StatusContext)
|
||||
if (!status || !highlighted || !rawContent?.current.length) return null
|
||||
|
||||
const { t } = useTranslation('componentTimeline')
|
||||
const { t } = useTranslation(['componentTimeline'])
|
||||
const { colors } = useTheme()
|
||||
|
||||
const [detected, setDetected] = useState<{
|
||||
@@ -101,15 +101,15 @@ const TimelineTranslate = () => {
|
||||
}}
|
||||
>
|
||||
{isError
|
||||
? t('shared.translate.failed')
|
||||
? t('componentTimeline:shared.translate.failed')
|
||||
: isSuccess
|
||||
? typeof data?.error === 'string'
|
||||
? t(`shared.translate.${data.error}`)
|
||||
: t('shared.translate.succeed', {
|
||||
? t(`componentTimeline:shared.translate.${data.error}` as any)
|
||||
: t('componentTimeline:shared.translate.succeed', {
|
||||
provider: data?.provider,
|
||||
source: data?.sourceLanguage
|
||||
})
|
||||
: t('shared.translate.default')}
|
||||
: t('componentTimeline:shared.translate.default')}
|
||||
</CustomText>
|
||||
{isFetching ? (
|
||||
<Circle
|
||||
|
Reference in New Issue
Block a user