fix(editor): final review round, prettier on shell chrome files

This commit is contained in:
bchanot committed 2026-11-13 23:42:32 +01:00
1 parent 6bf9290da7
commit d6e501ef04
2 files changed
+69 -19

No files matched your search

+19 -5
View File
@@ -39,7 +39,9 @@ export const EDITOR_SHELL: ShellBreakpoint = {
/** Title of the current /app page for the top bar, from the nav table. */
function pageTitleKey(pathname: string): string {
const match = NAV_ITEMS.find((item) =>
item.end ? item.to === pathname : pathname.startsWith(item.to) && item.to !== '/',
item.end
? item.to === pathname
: pathname.startsWith(item.to) && item.to !== '/',
)
return match?.labelKey ?? 'shell.nav.dashboard'
}
@@ -51,7 +53,11 @@ export function Sidebar({ shell }: { shell: ShellBreakpoint }) {
className={`${shell.sidebar} sticky top-0 h-dvh self-start overflow-y-auto border-r border-[var(--color-border)] bg-[var(--color-surface)]`}
>
<div className="px-5 py-5">
<Link to="/app" aria-label={t('shell.nav.dashboard')} className="inline-block">
<Link
to="/app"
aria-label={t('shell.nav.dashboard')}
className="inline-block"
>
<Brand size="md" />
</Link>
</div>
@@ -90,10 +96,16 @@ export function TopBar({ shell, menuOpen, onOpenMenu }: TopBarProps) {
>
<Icon name="menu" />
</button>
<Link to="/app" className={shell.menuControl} aria-label={t('shell.nav.dashboard')}>
<Link
to="/app"
className={shell.menuControl}
aria-label={t('shell.nav.dashboard')}
>
<Brand size="sm" />
</Link>
<h1 className={`${shell.title} text-sm font-medium text-[var(--color-ink-muted)]`}>
<h1
className={`${shell.title} text-sm font-medium text-[var(--color-ink-muted)]`}
>
{t(pageTitleKey(pathname))}
</h1>
<div className="ml-auto flex items-center gap-2 sm:gap-3">
@@ -105,7 +117,9 @@ export function TopBar({ shell, menuOpen, onOpenMenu }: TopBarProps) {
className="flex min-h-11 items-center gap-2 rounded-full pr-1 pl-1 text-sm text-[var(--color-ink)] hover:bg-[var(--color-surface-strong)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)] sm:pr-3"
>
<AvatarCircle size="sm" />
<span className="hidden max-w-[12rem] truncate sm:inline">{displayName}</span>
<span className="hidden max-w-[12rem] truncate sm:inline">
{displayName}
</span>
</Link>
</div>
</header>