Spaces:
Running
Running
Mhamdans17 commited on
Commit ·
f3c5fbf
1
Parent(s): e2c1c25
fix: tightly lock AdminLayout to prevent body scroll bouncing
Browse files
src/layouts/AdminLayout.jsx
CHANGED
|
@@ -4,9 +4,9 @@ import Sidebar from '../components/Sidebar';
|
|
| 4 |
|
| 5 |
export default function AdminLayout() {
|
| 6 |
return (
|
| 7 |
-
<div style={{
|
| 8 |
<Sidebar />
|
| 9 |
-
<main className="admin-main" style={{ marginLeft: '256px',
|
| 10 |
<Navbar />
|
| 11 |
<div className="admin-content" style={{ padding: '28px 32px', flex: 1 }}>
|
| 12 |
<Outlet />
|
|
|
|
| 4 |
|
| 5 |
export default function AdminLayout() {
|
| 6 |
return (
|
| 7 |
+
<div style={{ position: 'fixed', inset: 0, background: '#f0f5f8', overflow: 'hidden' }}>
|
| 8 |
<Sidebar />
|
| 9 |
+
<main className="admin-main" style={{ marginLeft: '256px', height: '100dvh', display: 'flex', flexDirection: 'column', minWidth: 0, overflowX: 'hidden', overflowY: 'auto', transition: 'margin-left 0.2s ease', WebkitOverflowScrolling: 'touch' }}>
|
| 10 |
<Navbar />
|
| 11 |
<div className="admin-content" style={{ padding: '28px 32px', flex: 1 }}>
|
| 12 |
<Outlet />
|