import { Suspense } from 'react';
import Link from 'next/link';
import { auth, sessionUser } from '@/auth';
import { Button } from '@/components/ui/Button';
import { UserMenu } from '@/components/UserMenu';
import { IconPlus, IconSeparator } from '@/components/ui/Icons';
import { LoginMenu } from './LoginMenu';
import { redirect } from 'next/navigation';
import Image from 'next/image';
import LandingLogo from '@/assets/svg/LandingAI_white.svg';
import ChatSelectServer from './ChatSelectServer';
import Loading from './ui/Loading';
import { Skeleton } from './ui/Skeleton';
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from '@/components/ui/Tooltip';
import { IconDiscord, IconGitHub } from '@/components/ui/Icons';
export async function Header() {
const session = await auth();
// const { isAdmin } = await sessionUser();
if (process.env.NEXT_PUBLIC_IS_HUGGING_FACE) {
return (
);
}
return (
{session?.user && (
}>
)}
{/*
New chat
*/}
{/* {isAdmin && (
)}
{isAdmin && (
)} */}
Github
Discord
{session?.user ? : }
);
}