feat(chat-window): remove loading state

This commit is contained in:
ItzCrazyKns
2025-11-14 23:17:41 +05:30
parent 1da9b7655c
commit a00f2231d4

View File

@@ -8,7 +8,6 @@ import { Settings } from 'lucide-react';
import Link from 'next/link'; import Link from 'next/link';
import NextError from 'next/error'; import NextError from 'next/error';
import { useChat } from '@/lib/hooks/useChat'; import { useChat } from '@/lib/hooks/useChat';
import Loader from './ui/Loader';
import SettingsButtonMobile from './Settings/SettingsButtonMobile'; import SettingsButtonMobile from './Settings/SettingsButtonMobile';
export interface BaseMessage { export interface BaseMessage {
@@ -52,7 +51,7 @@ export interface File {
} }
const ChatWindow = () => { const ChatWindow = () => {
const { hasError, isReady, notFound, messages } = useChat(); const { hasError, notFound, messages } = useChat();
if (hasError) { if (hasError) {
return ( return (
<div className="relative"> <div className="relative">
@@ -68,8 +67,7 @@ const ChatWindow = () => {
); );
} }
return isReady ? ( return notFound ? (
notFound ? (
<NextError statusCode={404} /> <NextError statusCode={404} />
) : ( ) : (
<div> <div>
@@ -82,11 +80,6 @@ const ChatWindow = () => {
<EmptyChat /> <EmptyChat />
)} )}
</div> </div>
)
) : (
<div className="flex flex-row items-center justify-center min-h-screen">
<Loader />
</div>
); );
}; };