Skip to content

Commit

Permalink
update: orgChatToggler
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceBaghel258025 committed Sep 21, 2024
1 parent c8eb428 commit 88fdae1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 13 additions & 9 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import InputBar from "@/components/inputBar2";
import { ChatType } from "@/lib/types";
import { parseAsString, useQueryState } from "next-usequerystate";
import ChatCardWrapper from "@/components/chatcardwrapper";
import { OrgChatToggler } from "@/components/chatSidebar";

const handleSmoothScroll = (): void => {
if (typeof window !== "undefined") {
Expand Down Expand Up @@ -116,7 +117,7 @@ export default function Home() {
Let's hyper-accelerate your research.
</h1>
<div className="grid md:grid-col-2 gap-4 sm:grid-col-1 p-4">
{isSignedIn && orgId ? (
{isSignedIn && orgId && orgSlug ? (
<div className="w-full md:min-w-[400px] lg:min-w-[600px] xl:min-w-[800px] ">
<InputBar
isHome={true}
Expand All @@ -130,14 +131,17 @@ export default function Home() {
setChattype as Dispatch<SetStateAction<ChatType>>
}
/>
<div className="w-full md:w-[400px] lg:w-[600px] xl:w-[800px] h-[500px] overflow-y-scroll scrollbar-hide">
<ChatCardWrapper
isHome={true}
org_id={orgId}
org_slug={orgSlug!}
uid={userId}
initialData={[]}
/>
<div className="flex flex-col gap-y-4">
<OrgChatToggler orgId={orgId} orgSlug={orgSlug} />
<div className="w-full md:w-[400px] lg:w-[600px] xl:w-[800px] h-[500px] overflow-y-scroll scrollbar-hide">
<ChatCardWrapper
isHome={true}
org_id={orgId}
org_slug={orgSlug!}
uid={userId}
initialData={[]}
/>
</div>
</div>
</div>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/chatSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ChatSidebar({
);
}

const OrgChatToggler = ({
export const OrgChatToggler = ({
orgId,
orgSlug,
}: {
Expand Down

0 comments on commit 88fdae1

Please sign in to comment.