SEO Fixed and Added Semantic Html Tags (#98)

This commit is contained in:
Awesh Choudhary 2023-03-23 20:01:45 +05:30 committed by GitHub
parent 1789351ab5
commit 2b1ef7be3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View File

@ -9,7 +9,7 @@ interface Props {
export const Navbar: FC<Props> = ({ selectedConversation, onNewConversation }) => { export const Navbar: FC<Props> = ({ selectedConversation, onNewConversation }) => {
return ( return (
<div className="flex justify-between bg-[#202123] py-3 px-4 w-full"> <nav className="flex justify-between bg-[#202123] py-3 px-4 w-full">
<div className="mr-4"></div> <div className="mr-4"></div>
<div className="max-w-[240px] whitespace-nowrap overflow-hidden text-ellipsis">{selectedConversation.name}</div> <div className="max-w-[240px] whitespace-nowrap overflow-hidden text-ellipsis">{selectedConversation.name}</div>
@ -18,6 +18,6 @@ export const Navbar: FC<Props> = ({ selectedConversation, onNewConversation }) =
className="cursor-pointer hover:text-neutral-400" className="cursor-pointer hover:text-neutral-400"
onClick={onNewConversation} onClick={onNewConversation}
/> />
</div> </nav>
); );
}; };

View File

@ -40,8 +40,8 @@ export const Sidebar: FC<Props> = ({ loading, conversations, lightMode, selected
}, [searchTerm, conversations]); }, [searchTerm, conversations]);
return ( return (
<div className={`h-full flex flex-none space-y-2 p-2 flex-col bg-[#202123] w-[260px] z-10 sm:relative sm:top-0 absolute top-12 bottom-0`}> <aside className={`h-full flex flex-none space-y-2 p-2 flex-col bg-[#202123] w-[260px] z-10 sm:relative sm:top-0 absolute top-12 bottom-0`}>
<div className="flex items-center"> <header className="flex items-center">
<button <button
className="flex gap-3 p-3 items-center w-full sm:w-[200px] rounded-md hover:bg-gray-500/10 transition-colors duration-200 text-white cursor-pointer text-sm flex-shrink-0 border border-white/20" className="flex gap-3 p-3 items-center w-full sm:w-[200px] rounded-md hover:bg-gray-500/10 transition-colors duration-200 text-white cursor-pointer text-sm flex-shrink-0 border border-white/20"
onClick={() => { onClick={() => {
@ -61,7 +61,7 @@ export const Sidebar: FC<Props> = ({ loading, conversations, lightMode, selected
size={32} size={32}
onClick={onToggleSidebar} onClick={onToggleSidebar}
/> />
</div> </header>
{conversations.length > 1 && ( {conversations.length > 1 && (
<Search <Search
@ -96,6 +96,6 @@ export const Sidebar: FC<Props> = ({ loading, conversations, lightMode, selected
onExportConversations={onExportConversations} onExportConversations={onExportConversations}
onImportConversations={onImportConversations} onImportConversations={onImportConversations}
/> />
</div> </aside>
); );
}; };

View File

@ -352,7 +352,7 @@ export default function Home() {
/> />
</Head> </Head>
{selectedConversation && ( {selectedConversation && (
<div className={`flex flex-col h-screen w-screen text-white dark:text-white text-sm ${lightMode}`}> <main className={`flex flex-col h-screen w-screen text-white dark:text-white text-sm ${lightMode}`}>
<div className="sm:hidden w-full fixed top-0"> <div className="sm:hidden w-full fixed top-0">
<Navbar <Navbar
selectedConversation={selectedConversation} selectedConversation={selectedConversation}
@ -360,7 +360,7 @@ export default function Home() {
/> />
</div> </div>
<div className="flex h-full w-full pt-[48px] sm:pt-0"> <article className="flex h-full w-full pt-[48px] sm:pt-0">
{showSidebar ? ( {showSidebar ? (
<> <>
<Sidebar <Sidebar
@ -405,8 +405,8 @@ export default function Home() {
onUpdateConversation={handleUpdateConversation} onUpdateConversation={handleUpdateConversation}
stopConversationRef={stopConversationRef} stopConversationRef={stopConversationRef}
/> />
</div> </article>
</div> </main>
)} )}
</> </>
); );