mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
refactor(layout): remove Header from AppLayout and add Header to PlaygroundLayout
This commit is contained in:
parent
0159998234
commit
e504d92ad9
@ -1,5 +1,3 @@
|
||||
import { Header } from "@/components/header";
|
||||
|
||||
interface AppLayoutProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
@ -7,7 +5,6 @@ interface AppLayoutProps {
|
||||
export default function AppLayout({ children }: AppLayoutProps) {
|
||||
return (
|
||||
<div className="h-full flex flex-col">
|
||||
<Header />
|
||||
<main className="flex-1">
|
||||
{children}
|
||||
</main>
|
||||
|
@ -3,6 +3,7 @@ import {
|
||||
ResizablePanel,
|
||||
ResizablePanelGroup,
|
||||
} from "@/components/ui/resizable";
|
||||
import { Header } from "@/components/header";
|
||||
|
||||
interface PlaygroundLayoutProps {
|
||||
problem: React.ReactNode;
|
||||
@ -14,17 +15,26 @@ export default function PlaygroundLayout({
|
||||
workspace,
|
||||
}: PlaygroundLayoutProps) {
|
||||
return (
|
||||
<ResizablePanelGroup direction="horizontal" className="p-2.5 pt-0">
|
||||
<ResizablePanel defaultSize={50} className="border border-muted rounded-2xl">
|
||||
{problem}
|
||||
</ResizablePanel>
|
||||
<ResizableHandle
|
||||
withHandle
|
||||
className="w-0.5 bg-transparent hover:bg-blue-500 mx-1"
|
||||
/>
|
||||
<ResizablePanel defaultSize={50} className="border border-muted rounded-2xl">
|
||||
{workspace}
|
||||
</ResizablePanel>
|
||||
</ResizablePanelGroup>
|
||||
<div className="h-full flex flex-col">
|
||||
<Header />
|
||||
<ResizablePanelGroup direction="horizontal" className="p-2.5 pt-0">
|
||||
<ResizablePanel
|
||||
defaultSize={50}
|
||||
className="border border-muted rounded-2xl"
|
||||
>
|
||||
{problem}
|
||||
</ResizablePanel>
|
||||
<ResizableHandle
|
||||
withHandle
|
||||
className="w-0.5 bg-transparent hover:bg-blue-500 mx-1"
|
||||
/>
|
||||
<ResizablePanel
|
||||
defaultSize={50}
|
||||
className="border border-muted rounded-2xl"
|
||||
>
|
||||
{workspace}
|
||||
</ResizablePanel>
|
||||
</ResizablePanelGroup>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user