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
9c9f0ddb
Unverified
Commit
9c9f0ddb
authored
Aug 23, 2023
by
Matri
Committed by
GitHub
Aug 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: user activation request 404 issue (#963)
parent
f8fbe96d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
activateForm.tsx
web/app/activate/activateForm.tsx
+3
-3
No files found.
web/app/activate/activateForm.tsx
View file @
9c9f0ddb
'use client'
import
{
useState
}
from
'react'
import
{
use
Callback
,
use
State
}
from
'react'
import
{
useContext
}
from
'use-context-selector'
import
{
useTranslation
}
from
'react-i18next'
import
useSWR
from
'swr'
...
...
@@ -45,7 +45,7 @@ const ActivateForm = () => {
const
[
timezone
,
setTimezone
]
=
useState
(
'Asia/Shanghai'
)
const
[
language
,
setLanguage
]
=
useState
(
'en-US'
)
const
[
showSuccess
,
setShowSuccess
]
=
useState
(
false
)
const
defaultLanguage
=
(
navigator
.
language
?.
startsWith
(
'zh'
)
?
languageMaps
[
'zh-Hans'
]
:
languageMaps
.
en
)
||
languageMaps
.
en
const
defaultLanguage
=
useCallback
(()
=>
(
window
.
navigator
.
language
.
startsWith
(
'zh'
)
?
languageMaps
[
'zh-Hans'
]
:
languageMaps
.
en
)
||
languageMaps
.
en
,
[])
const
showErrorMessage
=
(
message
:
string
)
=>
{
Toast
.
notify
({
...
...
@@ -169,7 +169,7 @@ const ActivateForm = () => {
</
label
>
<
div
className=
"relative mt-1 rounded-md shadow-sm"
>
<
SimpleSelect
defaultValue=
{
defaultLanguage
}
defaultValue=
{
defaultLanguage
()
}
items=
{
languages
}
onSelect=
{
(
item
)
=>
{
setLanguage
(
item
.
value
as
string
)
...
...
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