Merge pull request #168 from WanQuanXie/fix-ui-compile-type-error

fix(ui): ui compile fail
This commit is contained in:
ItzCrazyKns 2024-06-23 09:42:07 +05:30 committed by GitHub
commit 5fd64ef6e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 1 additions and 11 deletions

View File

@ -1,5 +1,4 @@
import EmptyChatMessageInput from './EmptyChatMessageInput'; import EmptyChatMessageInput from './EmptyChatMessageInput';
import ThemeSwitcher from './theme/Switcher';
const EmptyChat = ({ const EmptyChat = ({
sendMessage, sendMessage,
@ -12,8 +11,6 @@ const EmptyChat = ({
}) => { }) => {
return ( return (
<div className="relative"> <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"> <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"> <h2 className="text-black/70 dark:text-white/70 text-3xl font-medium -mt-8">
Research begins here. Research begins here.

View File

@ -7,7 +7,6 @@ import { cn } from '@/lib/utils';
import { import {
BookCopy, BookCopy,
Disc3, Disc3,
Share,
Volume2, Volume2,
StopCircle, StopCircle,
Layers3, Layers3,

View File

@ -2,7 +2,6 @@ import { Clock, Edit, Share, Trash } from 'lucide-react';
import { Message } from './ChatWindow'; import { Message } from './ChatWindow';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { formatTimeDifference } from '@/lib/utils'; import { formatTimeDifference } from '@/lib/utils';
import ThemeSwitcher from './theme/Switcher';
const Navbar = ({ messages }: { messages: Message[] }) => { const Navbar = ({ messages }: { messages: Message[] }) => {
const [title, setTitle] = useState<string>(''); const [title, setTitle] = useState<string>('');
@ -50,8 +49,6 @@ const Navbar = ({ messages }: { messages: Message[] }) => {
</div> </div>
<p className="hidden lg:flex">{title}</p> <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"> <div className="flex flex-row items-center space-x-4">
<Share <Share
size={17} size={17}

View File

@ -4,7 +4,6 @@ import { CloudUpload, RefreshCcw, RefreshCw } from 'lucide-react';
import React, { import React, {
Fragment, Fragment,
useEffect, useEffect,
useMemo,
useState, useState,
type SelectHTMLAttributes, type SelectHTMLAttributes,
} from 'react'; } from 'react';

View File

@ -7,7 +7,6 @@ import { useSelectedLayoutSegments } from 'next/navigation';
import React, { useState, type ReactNode } from 'react'; import React, { useState, type ReactNode } from 'react';
import Layout from './Layout'; import Layout from './Layout';
import SettingsDialog from './SettingsDialog'; import SettingsDialog from './SettingsDialog';
import ThemeSwitcher from './theme/Switcher';
const VerticalIconContainer = ({ children }: { children: ReactNode }) => { const VerticalIconContainer = ({ children }: { children: ReactNode }) => {
return ( return (

View File

@ -2,7 +2,6 @@
import { useTheme } from 'next-themes'; import { useTheme } from 'next-themes';
import { SunIcon, MoonIcon, MonitorIcon } from 'lucide-react'; import { SunIcon, MoonIcon, MonitorIcon } from 'lucide-react';
import { useCallback, useEffect, useState } from 'react'; import { useCallback, useEffect, useState } from 'react';
import { cn } from '@/lib/utils';
import { Select } from '../SettingsDialog'; import { Select } from '../SettingsDialog';
type Theme = 'dark' | 'light' | 'system'; type Theme = 'dark' | 'light' | 'system';
@ -53,7 +52,7 @@ const ThemeSwitcher = ({ className }: { className?: string }) => {
onChange={(e) => handleThemeSwitch(e.target.value as Theme)} onChange={(e) => handleThemeSwitch(e.target.value as Theme)}
options={[ options={[
{ value: 'light', label: 'Light' }, { value: 'light', label: 'Light' },
{ value: 'dark', label: 'Dark' } { value: 'dark', label: 'Dark' },
]} ]}
/> />
); );