init
This commit is contained in:
9
frontend/src/layouts/DefaultLayout.tsx
Normal file
9
frontend/src/layouts/DefaultLayout.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Outlet } from "react-router-dom";
|
||||
|
||||
export function DefaultLayout() {
|
||||
return (
|
||||
<div className="default-layout">
|
||||
<Outlet />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
18
frontend/src/layouts/SidebarLayout.tsx
Normal file
18
frontend/src/layouts/SidebarLayout.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Outlet, useLocation } from "react-router-dom";
|
||||
|
||||
export function SidebarLayout() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<div className="shell">
|
||||
<aside className="shell__sidebar">
|
||||
<div className="shell__brand">K12Study</div>
|
||||
<div className="shell__hint">React 管理端基础壳</div>
|
||||
</aside>
|
||||
<main className="shell__content">
|
||||
<header className="shell__header">{location.pathname}</header>
|
||||
<Outlet />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user