'use client' import React from 'react' import { useContext } from 'use-context-selector' import Select from '@/app/components/base/select/locale' import Divider from '@/app/components/base/divider' import { languages } from '@/i18n/language' import type { Locale } from '@/i18n' import I18n from '@/context/i18n' import dynamic from 'next/dynamic' import { useGlobalPublicStore } from '@/context/global-public-context' // Avoid rendering the logo and theme selector on the server const DifyLogo = dynamic(() => import('@/app/components/base/logo/dify-logo'), { ssr: false, loading: () =>
, }) const ThemeSelector = dynamic(() => import('@/app/components/base/theme-selector'), { ssr: false, loading: () =>
, }) const Header = () => { const { locale, setLocaleOnClient } = useContext(I18n) const systemFeatures = useGlobalPublicStore(s => s.systemFeatures) return (
{systemFeatures.branding.enabled && systemFeatures.branding.login_page_logo ? logo : }