Improve sidebar, new chat, and share dialog (#190)
This commit is contained in:
parent
35e83dc87e
commit
be90a40427
23 changed files with 598 additions and 217 deletions
19
components/sidebar-desktop.tsx
Normal file
19
components/sidebar-desktop.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { Sidebar } from '@/components/sidebar'
|
||||
|
||||
import { auth } from '@/auth'
|
||||
import { ChatHistory } from '@/components/chat-history'
|
||||
|
||||
export async function SidebarDesktop() {
|
||||
const session = await auth()
|
||||
|
||||
if (!session?.user?.id) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<Sidebar className="peer absolute inset-y-0 z-30 hidden -translate-x-full border-r bg-muted duration-300 ease-in-out data-[state=open]:translate-x-0 lg:flex lg:w-[250px] xl:w-[300px]">
|
||||
{/* @ts-ignore */}
|
||||
<ChatHistory userId={session.user.id} />
|
||||
</Sidebar>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue