2025-02-26 13:54:49 +00:00
|
|
|
import { cn } from "@/lib/utils";
|
2025-03-08 13:16:57 +00:00
|
|
|
import RunCode from "@/components/run-code";
|
2025-03-12 04:24:53 +00:00
|
|
|
import BackButton from "@/components/back-button";
|
2025-03-12 13:17:50 +00:00
|
|
|
import { AvatarButton } from "@/components/avatar-button";
|
2025-02-26 13:54:49 +00:00
|
|
|
|
2025-03-08 13:16:57 +00:00
|
|
|
interface PlaygroundHeaderProps {
|
2025-02-26 13:54:49 +00:00
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
2025-03-08 13:16:57 +00:00
|
|
|
export function PlaygroundHeader({
|
2025-02-26 13:54:49 +00:00
|
|
|
className,
|
|
|
|
...props
|
2025-03-08 13:16:57 +00:00
|
|
|
}: PlaygroundHeaderProps) {
|
2025-02-26 13:54:49 +00:00
|
|
|
return (
|
|
|
|
<header
|
|
|
|
{...props}
|
2025-03-03 03:40:05 +00:00
|
|
|
className={cn("relative", className)}
|
2025-02-26 13:54:49 +00:00
|
|
|
>
|
2025-03-03 03:40:05 +00:00
|
|
|
<nav className="relative h-12 w-full flex shrink-0 items-center px-2.5">
|
|
|
|
<div className="w-full flex justify-between">
|
|
|
|
<div className="w-full flex items-center justify-between">
|
2025-03-12 04:24:53 +00:00
|
|
|
<div className="z-10 flex items-center">
|
|
|
|
<BackButton href="/problemset" />
|
|
|
|
</div>
|
|
|
|
<div className="z-10 flex items-center gap-2">
|
2025-03-12 13:17:50 +00:00
|
|
|
<AvatarButton />
|
2025-03-03 03:40:05 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|
2025-03-09 07:14:47 +00:00
|
|
|
<div className="absolute left-0 right-0 top-0 h-full mx-auto py-2">
|
|
|
|
<div className="relative flex justify-center">
|
2025-03-03 03:40:05 +00:00
|
|
|
<div className="relative flex overflow-hidden rounded">
|
2025-03-10 15:10:56 +00:00
|
|
|
<RunCode className="bg-muted text-muted-foreground hover:bg-muted/50" />
|
2025-03-03 03:40:05 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2025-02-26 13:54:49 +00:00
|
|
|
</header>
|
|
|
|
);
|
|
|
|
}
|