fix: strip Sidebar wrapper from RouteDetail + fix StatusDot prop in LayoutSection
- RouteDetail.tsx was missed in page stripping pass — remove AppShell + Sidebar wrapper, replace with fragment - LayoutSection.tsx used StatusDot status= instead of variant= Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,7 @@ const SAMPLE_APP_NODES: SidebarTreeNode[] = [
|
|||||||
{
|
{
|
||||||
id: 'app1',
|
id: 'app1',
|
||||||
label: 'cameleer-prod',
|
label: 'cameleer-prod',
|
||||||
icon: <StatusDot status="live" />,
|
icon: <StatusDot variant="live" />,
|
||||||
badge: '14.3k',
|
badge: '14.3k',
|
||||||
path: '/apps/app1',
|
path: '/apps/app1',
|
||||||
starrable: true,
|
starrable: true,
|
||||||
@@ -44,7 +44,7 @@ const SAMPLE_APP_NODES: SidebarTreeNode[] = [
|
|||||||
{
|
{
|
||||||
id: 'app2',
|
id: 'app2',
|
||||||
label: 'cameleer-staging',
|
label: 'cameleer-staging',
|
||||||
icon: <StatusDot status="stale" />,
|
icon: <StatusDot variant="stale" />,
|
||||||
badge: '871',
|
badge: '871',
|
||||||
path: '/apps/app2',
|
path: '/apps/app2',
|
||||||
starrable: true,
|
starrable: true,
|
||||||
@@ -56,7 +56,7 @@ const SAMPLE_APP_NODES: SidebarTreeNode[] = [
|
|||||||
{
|
{
|
||||||
id: 'app3',
|
id: 'app3',
|
||||||
label: 'cameleer-dev',
|
label: 'cameleer-dev',
|
||||||
icon: <StatusDot status="dead" />,
|
icon: <StatusDot variant="dead" />,
|
||||||
badge: '42',
|
badge: '42',
|
||||||
path: '/apps/app3',
|
path: '/apps/app3',
|
||||||
starrable: true,
|
starrable: true,
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import { AlertTriangle } from 'lucide-react'
|
|||||||
import styles from './RouteDetail.module.css'
|
import styles from './RouteDetail.module.css'
|
||||||
|
|
||||||
// Layout
|
// Layout
|
||||||
import { AppShell } from '../../design-system/layout/AppShell/AppShell'
|
|
||||||
import { Sidebar } from '../../design-system/layout/Sidebar/Sidebar'
|
|
||||||
import { TopBar } from '../../design-system/layout/TopBar/TopBar'
|
import { TopBar } from '../../design-system/layout/TopBar/TopBar'
|
||||||
|
|
||||||
// Composites
|
// Composites
|
||||||
@@ -22,7 +20,6 @@ import { InfoCallout } from '../../design-system/primitives/InfoCallout/InfoCall
|
|||||||
// Mock data
|
// Mock data
|
||||||
import { routes } from '../../mocks/routes'
|
import { routes } from '../../mocks/routes'
|
||||||
import { exchanges, type Exchange } from '../../mocks/exchanges'
|
import { exchanges, type Exchange } from '../../mocks/exchanges'
|
||||||
import { SIDEBAR_APPS } from '../../mocks/sidebar'
|
|
||||||
|
|
||||||
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
||||||
function formatDuration(ms: number): string {
|
function formatDuration(ms: number): string {
|
||||||
@@ -199,11 +196,7 @@ export function RouteDetail() {
|
|||||||
// Not found state
|
// Not found state
|
||||||
if (!route) {
|
if (!route) {
|
||||||
return (
|
return (
|
||||||
<AppShell
|
<>
|
||||||
sidebar={
|
|
||||||
<Sidebar apps={SIDEBAR_APPS} />
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<TopBar
|
<TopBar
|
||||||
breadcrumb={[
|
breadcrumb={[
|
||||||
{ label: 'Applications', href: '/apps' },
|
{ label: 'Applications', href: '/apps' },
|
||||||
@@ -211,24 +204,19 @@ export function RouteDetail() {
|
|||||||
{ label: id ?? 'Unknown' },
|
{ label: id ?? 'Unknown' },
|
||||||
]}
|
]}
|
||||||
environment="PRODUCTION"
|
environment="PRODUCTION"
|
||||||
|
|
||||||
user={{ name: 'hendrik' }}
|
user={{ name: 'hendrik' }}
|
||||||
/>
|
/>
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
<InfoCallout variant="warning">Route "{id}" not found in mock data.</InfoCallout>
|
<InfoCallout variant="warning">Route "{id}" not found in mock data.</InfoCallout>
|
||||||
</div>
|
</div>
|
||||||
</AppShell>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const statusVariant = routeStatusVariant(route.status)
|
const statusVariant = routeStatusVariant(route.status)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppShell
|
<>
|
||||||
sidebar={
|
|
||||||
<Sidebar apps={SIDEBAR_APPS} />
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{/* Top bar */}
|
{/* Top bar */}
|
||||||
<TopBar
|
<TopBar
|
||||||
breadcrumb={[
|
breadcrumb={[
|
||||||
@@ -375,6 +363,6 @@ export function RouteDetail() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</AppShell>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user