perplexica/ui/components/EmptyChat.tsx

47 lines
1.4 KiB
TypeScript
Raw Permalink Normal View History

import { Settings } from 'lucide-react';
2024-04-09 10:51:05 +00:00
import EmptyChatMessageInput from './EmptyChatMessageInput';
import SettingsDialog from './SettingsDialog';
import { useState } from 'react';
2024-04-09 10:51:05 +00:00
const EmptyChat = ({
sendMessage,
2024-04-13 06:41:47 +00:00
focusMode,
setFocusMode,
optimizationMode,
setOptimizationMode,
2024-04-09 10:51:05 +00:00
}: {
sendMessage: (message: string) => void;
2024-04-13 06:41:47 +00:00
focusMode: string;
setFocusMode: (mode: string) => void;
optimizationMode: string;
setOptimizationMode: (mode: string) => void;
2024-04-09 10:51:05 +00:00
}) => {
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
2024-04-09 10:51:05 +00:00
return (
<div className="relative">
<SettingsDialog isOpen={isSettingsOpen} setIsOpen={setIsSettingsOpen} />
<div className="absolute w-full flex flex-row items-center justify-end mr-5 mt-5">
<Settings
className="cursor-pointer lg:hidden"
onClick={() => setIsSettingsOpen(true)}
/>
</div>
<div className="flex flex-col items-center justify-center min-h-screen max-w-screen-sm mx-auto p-2 space-y-8">
<h2 className="text-black/70 dark:text-white/70 text-3xl font-medium -mt-8">
Research begins here.
</h2>
<EmptyChatMessageInput
sendMessage={sendMessage}
focusMode={focusMode}
setFocusMode={setFocusMode}
optimizationMode={optimizationMode}
setOptimizationMode={setOptimizationMode}
/>
</div>
2024-04-09 10:51:05 +00:00
</div>
);
};
export default EmptyChat;