mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
feat: default timezone to user's local timezone in activate form (#5374)
This commit is contained in:
parent
a965d1ac98
commit
2b0c779173
|
@ -41,10 +41,9 @@ const ActivateForm = () => {
|
|||
|
||||
const [name, setName] = useState('')
|
||||
const [password, setPassword] = useState('')
|
||||
const [timezone, setTimezone] = useState('Asia/Shanghai')
|
||||
const [timezone, setTimezone] = useState(Intl.DateTimeFormat().resolvedOptions().timeZone)
|
||||
const [language, setLanguage] = useState(locale)
|
||||
const [showSuccess, setShowSuccess] = useState(false)
|
||||
const defaultLanguage = useCallback(() => (window.navigator.language.startsWith('zh') ? LanguagesSupported[1] : LanguagesSupported[0]) || LanguagesSupported[0], [])
|
||||
|
||||
const showErrorMessage = useCallback((message: string) => {
|
||||
Toast.notify({
|
||||
|
|
Loading…
Reference in New Issue
Block a user