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'; 'use client';
import ChatWindow from '@/components/ChatWindow'; import ChatWindow from '@/components/ChatWindow';
import React from 'react';
const Page = () => { export default ChatWindow;
return <ChatWindow />;
};
export default Page;

View File

@@ -51,22 +51,26 @@ const ChatWindow = () => {
); );
} }
return isReady ? notFound ? ( return isReady ? (
<NextError statusCode={404} /> notFound ? (
<NextError statusCode={404} />
) : (
<div>
{messages.length > 0 ? (
<>
<Navbar />
<Chat />
</>
) : (
<EmptyChat />
)}
</div>
)
) : ( ) : (
<div> <div className="flex items-center justify-center min-h-screen w-full">
{messages.length > 0 ? ( <Loader />
<>
<Navbar />
<Chat />
</>
) : (
<EmptyChat />
)}
</div> </div>
) : <div className='flex items-center justify-center min-h-screen w-full'> );
<Loader />
</div>;
}; };
export default ChatWindow; 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 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} {mode.icon}
<p className="text-xs font-medium">{mode.title}</p> <p className="text-xs font-medium">{mode.title}</p>
</div> </div>
{mode.key === 'quality' && ( {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 Beta
</span> </span>
)} )}

View File

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