Add PageShell — collapsed sidebar strip on Dashboard and all admin pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
de49df70b0
commit
b3c02adf76
7 changed files with 75 additions and 34 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { useEffect, useState } from 'react'
|
||||
import { Sidebar } from '../components/Sidebar'
|
||||
import { PageShell } from '../components/PageShell'
|
||||
import type { User, Role, Capability } from '../types'
|
||||
|
||||
export function AdminRoles({ user }: { user: User }) {
|
||||
|
|
@ -51,9 +51,7 @@ export function AdminRoles({ user }: { user: User }) {
|
|||
}
|
||||
|
||||
return (
|
||||
<div style={{ display: 'flex', height: '100dvh' }}>
|
||||
<Sidebar user={user} />
|
||||
<main style={{ flex: 1, overflowY: 'auto', padding: '1.5rem 2rem' }}>
|
||||
<PageShell user={user}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: '1.5rem' }}>
|
||||
<h1 style={{ fontSize: '1.2rem' }}>Roles</h1>
|
||||
<button onClick={() => setShowCreate(v => !v)} style={goldBtn}>
|
||||
|
|
@ -138,8 +136,7 @@ export function AdminRoles({ user }: { user: User }) {
|
|||
</div>
|
||||
))}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</PageShell>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue