Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
79b43662
Unverified
Commit
79b43662
authored
Dec 11, 2023
by
Joel
Committed by
GitHub
Dec 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: server component use translate errorts lint error (#1732)
parent
3675d2ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
page.tsx
web/app/(commonLayout)/apps/page.tsx
+2
-2
page.tsx
...asets/(datasetDetailLayout)/[datasetId]/settings/page.tsx
+2
-3
No files found.
web/app/(commonLayout)/apps/page.tsx
View file @
79b43662
...
@@ -2,11 +2,11 @@ import classNames from 'classnames'
...
@@ -2,11 +2,11 @@ import classNames from 'classnames'
import
style
from
'../list.module.css'
import
style
from
'../list.module.css'
import
Apps
from
'./Apps'
import
Apps
from
'./Apps'
import
{
getLocaleOnServer
}
from
'@/i18n/server'
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
AppList
=
async
()
=>
{
const
locale
=
getLocaleOnServer
()
const
locale
=
getLocaleOnServer
()
const
{
t
}
=
await
useTranslation
(
locale
,
'app'
)
const
{
t
}
=
await
translate
(
locale
,
'app'
)
return
(
return
(
<
div
className=
'flex flex-col overflow-auto bg-gray-100 shrink-0 grow'
>
<
div
className=
'flex flex-col overflow-auto bg-gray-100 shrink-0 grow'
>
...
...
web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/settings/page.tsx
View file @
79b43662
import
React
from
'react'
import
React
from
'react'
import
{
getLocaleOnServer
}
from
'@/i18n/server'
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'
import
Form
from
'@/app/components/datasets/settings/form'
type
Props
=
{
type
Props
=
{
...
@@ -11,8 +11,7 @@ const Settings = async ({
...
@@ -11,8 +11,7 @@ const Settings = async ({
params
:
{
datasetId
},
params
:
{
datasetId
},
}:
Props
)
=>
{
}:
Props
)
=>
{
const
locale
=
getLocaleOnServer
()
const
locale
=
getLocaleOnServer
()
// eslint-disable-next-line react-hooks/rules-of-hooks
const
{
t
}
=
await
translate
(
locale
,
'dataset-settings'
)
const
{
t
}
=
await
useTranslation
(
locale
,
'dataset-settings'
)
return
(
return
(
<
div
className=
'bg-white h-full overflow-y-auto'
>
<
div
className=
'bg-white h-full overflow-y-auto'
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment