mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
fix: move bottomChromeHeight after isTagStripVisible declaration
$derived cannot reference variables declared later in the script. Moved the calculation below the isTagStripVisible $state declaration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f0d5ba2128
commit
d73591865c
1 changed files with 3 additions and 2 deletions
|
|
@ -66,8 +66,6 @@
|
|||
let isCollapsed = $state(false);
|
||||
let showShortcuts = $state(false);
|
||||
let showOnboarding = $state(false);
|
||||
// Bottom chrome height: calculated from state, not measured (avoids reflow loop)
|
||||
const bottomChromeHeight = $derived((isCollapsed ? 0 : 80) + (isTagStripVisible ? 44 : 0) + 72); // PillNav ~80px + TagStrip ~44px + QuickInputBar ~72px
|
||||
|
||||
// ── Theme ───────────────────────────────────────────────
|
||||
let isDark = $derived(theme.isDark);
|
||||
|
|
@ -129,6 +127,9 @@
|
|||
isTagStripVisible = !isTagStripVisible;
|
||||
}
|
||||
|
||||
// Bottom chrome height: calculated from state, not measured (avoids reflow loop)
|
||||
const bottomChromeHeight = $derived((isCollapsed ? 0 : 80) + (isTagStripVisible ? 44 : 0) + 72);
|
||||
|
||||
// ── DnD context ─────────────────────────────────────────
|
||||
let tagDropHandler = $state<((tagId: string, payload: DragPayload) => void) | null>(null);
|
||||
setContext('tagDropHandler', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue