feat(app): lint & beautify

This commit is contained in:
ItzCrazyKns
2025-12-23 18:54:01 +05:30
parent 24c32ed881
commit cf95ea0af7
4 changed files with 23 additions and 24 deletions

View File

@@ -1,10 +1,5 @@
'use client';
import ChatWindow from '@/components/ChatWindow';
import React from 'react';
const Page = () => {
return <ChatWindow />;
};
export default Page;
export default ChatWindow;

View File

@@ -51,22 +51,26 @@ const ChatWindow = () => {
);
}
return isReady ? notFound ? (
<NextError statusCode={404} />
return isReady ? (
notFound ? (
<NextError statusCode={404} />
) : (
<div>
{messages.length > 0 ? (
<>
<Navbar />
<Chat />
</>
) : (
<EmptyChat />
)}
</div>
)
) : (
<div>
{messages.length > 0 ? (
<>
<Navbar />
<Chat />
</>
) : (
<EmptyChat />
)}
<div className="flex items-center justify-center min-h-screen w-full">
<Loader />
</div>
) : <div className='flex items-center justify-center min-h-screen w-full'>
<Loader />
</div>;
);
};
export default ChatWindow;

View File

@@ -86,12 +86,12 @@ const Optimization = () => {
)}
>
<div className="flex flex-row justify-between w-full text-black dark:text-white">
<div className='flex flex-row space-x-1'>
<div className="flex flex-row space-x-1">
{mode.icon}
<p className="text-xs font-medium">{mode.title}</p>
</div>
{mode.key === 'quality' && (
<span className='bg-sky-500/70 dark:bg-sky-500/40 border border-sky-600 px-1 rounded-full text-[10px] text-white'>
<span className="bg-sky-500/70 dark:bg-sky-500/40 border border-sky-600 px-1 rounded-full text-[10px] text-white">
Beta
</span>
)}

View File

@@ -269,7 +269,7 @@ export const chatContext = createContext<ChatContext>({
export const ChatProvider = ({ children }: { children: React.ReactNode }) => {
const params: { chatId: string } = useParams();
const searchParams = useSearchParams();
const initialMessage = searchParams.get('q');
@@ -506,7 +506,7 @@ export const ChatProvider = ({ children }: { children: React.ReactNode }) => {
setIsReady(true);
console.debug(new Date(), 'app:ready');
} else if (isMessagesLoaded && isConfigReady && !newChatCreated) {
checkReconnect()
checkReconnect();
} else {
setIsReady(false);
}