import type { ReactNode } from 'react'; import { EModelEndpoint } from 'librechat-data-provider'; import { icons } from './Menus/Endpoints/Icons'; import { useChatContext } from '~/Providers'; import { useLocalize } from '~/hooks'; export default function Landing({ Header }: { Header?: ReactNode }) { const { conversation } = useChatContext(); const localize = useLocalize(); let { endpoint } = conversation ?? {}; if ( endpoint === EModelEndpoint.assistant || endpoint === EModelEndpoint.chatGPTBrowser || endpoint === EModelEndpoint.azureOpenAI || endpoint === EModelEndpoint.gptPlugins ) { endpoint = EModelEndpoint.openAI; } return (
{Header && Header}
{icons[endpoint ?? 'unknown']({ size: 41, className: 'h-2/3 w-2/3' })}
{localize('com_nav_welcome_message')}
); }