mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-07-04 05:35:13 +08:00
fix: ci (#3983)
This commit is contained in:
parent
338e4669e5
commit
b1194da6a5
@ -37,7 +37,7 @@ import { LanguagesSupported } from '@/i18n/language'
|
|||||||
import { useStore } from '@/app/components/app/store'
|
import { useStore } from '@/app/components/app/store'
|
||||||
import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'
|
import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'
|
||||||
import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'
|
import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'
|
||||||
import { getLocaleOnServer } from '@/i18n/server'
|
import { getLocaleOnClient } from '@/i18n'
|
||||||
|
|
||||||
export type IAppDetailLayoutProps = {
|
export type IAppDetailLayoutProps = {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
@ -119,7 +119,7 @@ type IExtraInfoProps = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => {
|
const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => {
|
||||||
const locale = getLocaleOnServer()
|
const locale = getLocaleOnClient()
|
||||||
const [isShowTips, { toggle: toggleTips, set: setShowTips }] = useBoolean(!isMobile)
|
const [isShowTips, { toggle: toggleTips, set: setShowTips }] = useBoolean(!isMobile)
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
|
@ -16,3 +16,7 @@ export const setLocaleOnClient = (locale: Locale, reloadPage = true) => {
|
|||||||
changeLanguage(locale)
|
changeLanguage(locale)
|
||||||
reloadPage && location.reload()
|
reloadPage && location.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getLocaleOnClient = (): Locale => {
|
||||||
|
return Cookies.get(LOCALE_COOKIE_NAME) as Locale || i18n.defaultLocale
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user