-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(markdown.tsx): failing due to some version bugs
- Loading branch information
Showing
5 changed files
with
240 additions
and
570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React from 'react' | ||
import Link from 'next/link' | ||
import { auth } from '@/auth' | ||
|
||
import { Button } from '@/components/ui/button' | ||
import { Icons } from '@/components/icons' | ||
import { Sidebar } from '@/components/sidebar/sidebar' | ||
import { ClearHistory } from '@/components/sidebar/sidebar-clear-history' | ||
import { SidebarFooter } from '@/components/sidebar/sidebar-footer' | ||
import { SidebarList } from '@/components/sidebar/sidebar-list' | ||
import { UserMenu } from '@/components/user-menu' | ||
import { clearChats } from '@/app/actions' | ||
|
||
export const HeaderUpperSection = async () => { | ||
const session = await auth() | ||
|
||
return ( | ||
<section className="flex items-center"> | ||
{session?.user ? ( | ||
<Sidebar> | ||
<React.Suspense fallback={<div className="flex-1 overflow-auto" />}> | ||
<SidebarList userId={session?.user?.id} /> | ||
</React.Suspense> | ||
<SidebarFooter> | ||
<Button variant="link"> | ||
<Link | ||
target="_blank" | ||
rel="noreferrer" | ||
href="https://www.mohamedgado.info" | ||
> | ||
Portfolio | ||
</Link> | ||
</Button> | ||
<ClearHistory clearChats={clearChats} /> | ||
</SidebarFooter> | ||
</Sidebar> | ||
) : ( | ||
<Link href="/" target="_blank" rel="nofollow"> | ||
<Icons.nextChat className="mr-2 h-6 w-6 dark:hidden" inverted /> | ||
<Icons.nextChat className="mr-2 hidden h-6 w-6 dark:block" /> | ||
</Link> | ||
)} | ||
<div className="flex items-center"> | ||
<Icons.separator className="h-6 w-6 text-muted-foreground/50" /> | ||
{session?.user ? ( | ||
<UserMenu user={session.user} /> | ||
) : ( | ||
<Button variant="link" asChild className="-ml-2"> | ||
<Link href="/login?callbackUrl=/">Login</Link> | ||
</Button> | ||
)} | ||
</div> | ||
</section> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.