diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 5fa07bff..4a65c6f8 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -40,7 +40,7 @@ import { Doc, getConversations } from './preferences/preferenceApi'; import SelectDocsModal from './preferences/SelectDocsModal'; import ConversationTile from './conversation/ConversationTile'; import { useDarkTheme } from './hooks'; -import Dropdown from './components/Dropdown'; +import SourceDropdown from './components/SourceDropdown'; interface NavigationProps { navOpen: boolean; @@ -277,7 +277,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
- { method: 'GET', }) .then((response) => { - if(response.ok && documents){ - const updatedDocuments = [...documents.slice(0, index), ...documents.slice(index + 1)]; + if (response.ok && documents) { + const updatedDocuments = [ + ...documents.slice(0, index), + ...documents.slice(index + 1), + ]; dispatch(setSourceDocs(updatedDocuments)); } }) @@ -96,8 +100,10 @@ const Setting: React.FC = () => { }; return ( -
-

Settings

+
+

+ Settings +

@@ -188,7 +195,9 @@ const General: React.FC = () => { const themes = ['Light', 'Dark']; const languages = ['English']; const [isDarkTheme, toggleTheme] = useDarkTheme(); - const [selectedTheme, setSelectedTheme] = useState(isDarkTheme ? 'Dark' : 'Light'); + const [selectedTheme, setSelectedTheme] = useState( + isDarkTheme ? 'Dark' : 'Light', + ); const [selectedLanguage, setSelectedLanguage] = useState(languages[0]); return (
@@ -197,14 +206,16 @@ const General: React.FC = () => { { - setSelectedTheme(option); - option !==selectedTheme && toggleTheme(); - }} + onSelect={(option: string) => { + setSelectedTheme(option); + option !== selectedTheme && toggleTheme(); + }} />
-

Select Language

+

+ Select Language +

= ({

Active Prompt

- = ({
-

Prompt name

{' '} +

Prompt name

{' '}

start by editing name

@@ -372,7 +383,7 @@ const Prompts: React.FC = ({

Prompt content