From 2ae5846b3d016387c4b8a72fce40a68917e0c342 Mon Sep 17 00:00:00 2001 From: WanQuanXie Date: Mon, 3 Jun 2024 18:54:12 +0800 Subject: [PATCH 1/2] fix(ui): ui compile fail remove both of them, a new feature is coming soon - mobile device support setting navbar --- ui/components/EmptyChat.tsx | 2 -- ui/components/Navbar.tsx | 2 -- 2 files changed, 4 deletions(-) diff --git a/ui/components/EmptyChat.tsx b/ui/components/EmptyChat.tsx index 2aade48..1efedf8 100644 --- a/ui/components/EmptyChat.tsx +++ b/ui/components/EmptyChat.tsx @@ -12,8 +12,6 @@ const EmptyChat = ({ }) => { return (
- -

Research begins here. diff --git a/ui/components/Navbar.tsx b/ui/components/Navbar.tsx index 0123267..9f3da92 100644 --- a/ui/components/Navbar.tsx +++ b/ui/components/Navbar.tsx @@ -50,8 +50,6 @@ const Navbar = ({ messages }: { messages: Message[] }) => {

{title}

- -
Date: Fri, 7 Jun 2024 16:39:14 +0800 Subject: [PATCH 2/2] update(ui): remove useless imports --- ui/components/EmptyChat.tsx | 1 - ui/components/MessageBox.tsx | 1 - ui/components/Navbar.tsx | 1 - ui/components/SettingsDialog.tsx | 1 - ui/components/Sidebar.tsx | 1 - ui/components/theme/Switcher.tsx | 3 +-- 6 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ui/components/EmptyChat.tsx b/ui/components/EmptyChat.tsx index 1efedf8..ea3642b 100644 --- a/ui/components/EmptyChat.tsx +++ b/ui/components/EmptyChat.tsx @@ -1,5 +1,4 @@ import EmptyChatMessageInput from './EmptyChatMessageInput'; -import ThemeSwitcher from './theme/Switcher'; const EmptyChat = ({ sendMessage, diff --git a/ui/components/MessageBox.tsx b/ui/components/MessageBox.tsx index 89c6761..1dce2d0 100644 --- a/ui/components/MessageBox.tsx +++ b/ui/components/MessageBox.tsx @@ -7,7 +7,6 @@ import { cn } from '@/lib/utils'; import { BookCopy, Disc3, - Share, Volume2, StopCircle, Layers3, diff --git a/ui/components/Navbar.tsx b/ui/components/Navbar.tsx index 9f3da92..020dfb4 100644 --- a/ui/components/Navbar.tsx +++ b/ui/components/Navbar.tsx @@ -2,7 +2,6 @@ import { Clock, Edit, Share, Trash } from 'lucide-react'; import { Message } from './ChatWindow'; import { useEffect, useState } from 'react'; import { formatTimeDifference } from '@/lib/utils'; -import ThemeSwitcher from './theme/Switcher'; const Navbar = ({ messages }: { messages: Message[] }) => { const [title, setTitle] = useState(''); diff --git a/ui/components/SettingsDialog.tsx b/ui/components/SettingsDialog.tsx index e932cee..d6ee18d 100644 --- a/ui/components/SettingsDialog.tsx +++ b/ui/components/SettingsDialog.tsx @@ -4,7 +4,6 @@ import { CloudUpload, RefreshCcw, RefreshCw } from 'lucide-react'; import React, { Fragment, useEffect, - useMemo, useState, type SelectHTMLAttributes, } from 'react'; diff --git a/ui/components/Sidebar.tsx b/ui/components/Sidebar.tsx index 7b3e971..ed8953e 100644 --- a/ui/components/Sidebar.tsx +++ b/ui/components/Sidebar.tsx @@ -7,7 +7,6 @@ import { useSelectedLayoutSegments } from 'next/navigation'; import React, { useState, type ReactNode } from 'react'; import Layout from './Layout'; import SettingsDialog from './SettingsDialog'; -import ThemeSwitcher from './theme/Switcher'; const VerticalIconContainer = ({ children }: { children: ReactNode }) => { return ( diff --git a/ui/components/theme/Switcher.tsx b/ui/components/theme/Switcher.tsx index 22e2ecc..43bbdc8 100644 --- a/ui/components/theme/Switcher.tsx +++ b/ui/components/theme/Switcher.tsx @@ -2,7 +2,6 @@ import { useTheme } from 'next-themes'; import { SunIcon, MoonIcon, MonitorIcon } from 'lucide-react'; import { useCallback, useEffect, useState } from 'react'; -import { cn } from '@/lib/utils'; import { Select } from '../SettingsDialog'; type Theme = 'dark' | 'light' | 'system'; @@ -53,7 +52,7 @@ const ThemeSwitcher = ({ className }: { className?: string }) => { onChange={(e) => handleThemeSwitch(e.target.value as Theme)} options={[ { value: 'light', label: 'Light' }, - { value: 'dark', label: 'Dark' } + { value: 'dark', label: 'Dark' }, ]} /> );