Skip to content

Commit

Permalink
Merge pull request #168 from WanQuanXie/fix-ui-compile-type-error
Browse files Browse the repository at this point in the history
fix(ui): ui compile fail
  • Loading branch information
ItzCrazyKns authored Jun 23, 2024
2 parents 476303f + 594106a commit 5fd64ef
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 11 deletions.
3 changes: 0 additions & 3 deletions ui/components/EmptyChat.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import EmptyChatMessageInput from './EmptyChatMessageInput';
import ThemeSwitcher from './theme/Switcher';

const EmptyChat = ({
sendMessage,
Expand All @@ -12,8 +11,6 @@ const EmptyChat = ({
}) => {
return (
<div className="relative">
<ThemeSwitcher size={17} className="absolute top-2 right-0 lg:hidden" />

<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
1 change: 0 additions & 1 deletion ui/components/MessageBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { cn } from '@/lib/utils';
import {
BookCopy,
Disc3,
Share,
Volume2,
StopCircle,
Layers3,
Expand Down
3 changes: 0 additions & 3 deletions ui/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>('');
Expand Down Expand Up @@ -50,8 +49,6 @@ const Navbar = ({ messages }: { messages: Message[] }) => {
</div>
<p className="hidden lg:flex">{title}</p>

<ThemeSwitcher size={17} className="lg:hidden ml-auto mr-4" />

<div className="flex flex-row items-center space-x-4">
<Share
size={17}
Expand Down
1 change: 0 additions & 1 deletion ui/components/SettingsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { CloudUpload, RefreshCcw, RefreshCw } from 'lucide-react';
import React, {
Fragment,
useEffect,
useMemo,
useState,
type SelectHTMLAttributes,
} from 'react';
Expand Down
1 change: 0 additions & 1 deletion ui/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 1 addition & 2 deletions ui/components/theme/Switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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' },
]}
/>
);
Expand Down

0 comments on commit 5fd64ef

Please sign in to comment.