LibreChat/client/src/components/Chat/Landing.tsx
Marco Beretta 3838ff4617
🌍: Dutch translation, fix translation, style(Dropdown): added scroll (#1218)
* italian translation

* some translation fixes + dutch translation

* fix(Dropdown) more dynamic

* fix(Nl)

* fix(Nl)

* added comment in Nl.tsx
2023-11-28 17:42:31 -05:00

34 lines
1.3 KiB
TypeScript

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 (
<div className="relative h-full">
<div className="absolute left-0 right-0">{Header && Header}</div>
<div className="flex h-full flex-col items-center justify-center">
<div className="mb-3 h-[72px] w-[72px]">
<div className="gizmo-shadow-stroke relative flex h-full items-center justify-center rounded-full bg-white text-black">
{icons[endpoint ?? 'unknown']({ size: 41, className: 'h-2/3 w-2/3' })}
</div>
</div>
<div className="mb-5 text-2xl font-medium dark:text-white">
{localize('com_nav_welcome_message')}
</div>
</div>
</div>
);
}