Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: server component use translate errorts lint error (#1732)

Joel79b436620349
diff --git a/web/app/(commonLayout)/apps/page.tsx b/web/app/(commonLayout)/apps/page.tsx
index 404c0aa7125..e2e774bec7f 100644
--- a/web/app/(commonLayout)/apps/page.tsx
+++ b/web/app/(commonLayout)/apps/page.tsx
@@ -2,11 +2,11 @@ import classNames from 'classnames'
import style from '../list.module.css'
import Apps from './Apps'
import { getLocaleOnServer } from '@/i18n/server'
-import { useTranslation } from '@/i18n/i18next-serverside-config'
+import { useTranslation as translate } from '@/i18n/i18next-serverside-config'
const AppList = async () => {
const locale = getLocaleOnServer()
- const { t } = await useTranslation(locale, 'app')
+ const { t } = await translate(locale, 'app')
return (
<div className='flex flex-col overflow-auto bg-gray-100 shrink-0 grow'>
diff --git a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/settings/page.tsx b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/settings/page.tsx
index 9e4a6e62db0..32bdd995839 100644
--- a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/settings/page.tsx
+++ b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/settings/page.tsx
@@ -1,6 +1,6 @@
import React from 'react'
import { getLocaleOnServer } from '@/i18n/server'
-import { useTranslation } from '@/i18n/i18next-serverside-config'
+import { useTranslation as translate } from '@/i18n/i18next-serverside-config'
import Form from '@/app/components/datasets/settings/form'
type Props = {
@@ -11,8 +11,7 @@ const Settings = async ({
params: { datasetId },
}: Props) => {
const locale = getLocaleOnServer()
- // eslint-disable-next-line react-hooks/rules-of-hooks
- const { t } = await useTranslation(locale, 'dataset-settings')
+ const { t } = await translate(locale, 'dataset-settings')
return (
<div className='bg-white h-full overflow-y-auto'>