2025-05-06 13:04:45 +00:00
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
import { Suspense } from "react";
|
2025-06-13 06:03:17 +00:00
|
|
|
import { BackButton } from "@/components/back-button";
|
|
|
|
import { JudgeButton } from "@/features/problems/components/judge-button";
|
2025-05-06 13:04:45 +00:00
|
|
|
import { UserAvatar, UserAvatarSkeleton } from "@/components/user-avatar";
|
2025-06-13 06:03:17 +00:00
|
|
|
import { ViewBotButton } from "@/features/problems/bot/components/view-bot-button";
|
2025-05-06 13:04:45 +00:00
|
|
|
|
|
|
|
interface ProblemHeaderProps {
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
2025-06-13 06:03:17 +00:00
|
|
|
export const ProblemHeader = ({ className }: ProblemHeaderProps) => {
|
2025-05-06 13:04:45 +00:00
|
|
|
return (
|
|
|
|
<header
|
|
|
|
className={cn("relative flex h-12 flex-none items-center", className)}
|
|
|
|
>
|
|
|
|
<div className="container mx-auto flex h-full items-center justify-between px-4">
|
|
|
|
<div className="flex items-center">
|
2025-06-13 06:03:17 +00:00
|
|
|
<BackButton href="/problemset" />
|
2025-05-06 13:04:45 +00:00
|
|
|
</div>
|
2025-06-13 06:03:17 +00:00
|
|
|
<div className="flex items-center gap-4">
|
|
|
|
<ViewBotButton />
|
2025-05-06 13:04:45 +00:00
|
|
|
<Suspense fallback={<UserAvatarSkeleton />}>
|
|
|
|
<UserAvatar />
|
|
|
|
</Suspense>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="absolute inset-y-0 left-1/2 z-10 flex -translate-x-1/2 items-center">
|
2025-06-13 06:03:17 +00:00
|
|
|
<JudgeButton />
|
2025-05-06 13:04:45 +00:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
);
|
|
|
|
};
|