Skip to content

Commit

Permalink
feat(empty-chat): add settings for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzCrazyKns committed Oct 30, 2024
1 parent f1c0b54 commit 540f38a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions ui/components/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ const ChatWindow = ({ id }: { id?: string }) => {
console.log('[DEBUG] closed');
}
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const messagesRef = useRef<Message[]>([]);
Expand Down
12 changes: 12 additions & 0 deletions ui/components/EmptyChat.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Settings } from 'lucide-react';
import EmptyChatMessageInput from './EmptyChatMessageInput';
import SettingsDialog from './SettingsDialog';
import { useState } from 'react';

const EmptyChat = ({
sendMessage,
Expand All @@ -13,8 +16,17 @@ const EmptyChat = ({
optimizationMode: string;
setOptimizationMode: (mode: string) => void;
}) => {
const [isSettingsOpen, setIsSettingsOpen] = useState(false);

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.
Expand Down

0 comments on commit 540f38a

Please sign in to comment.