fix: hide all modal content when closed — empty glass box keeps GPU blur warm
This commit is contained in:
@@ -392,6 +392,9 @@ export default function UnifiedSettingsModal() {
|
||||
className="w-full max-w-3xl h-[85vh] bg-neutral-900/65 backdrop-blur-3xl backdrop-saturate-150 supports-[backdrop-filter]:bg-neutral-900/60 border border-white/[0.08] rounded-2xl shadow-xl shadow-black/20 flex flex-col overflow-hidden"
|
||||
onClick={e => e.stopPropagation()}
|
||||
>
|
||||
{/* All content gated by isOpen — empty glass box when closed (GPU keeps blur warm) */}
|
||||
{isOpen && (
|
||||
<>
|
||||
{/* Header */}
|
||||
<div className="shrink-0 px-6 pt-5 pb-4 border-b border-white/[0.06]">
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
@@ -417,9 +420,8 @@ export default function UnifiedSettingsModal() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Content — only render tab content when open to avoid unnecessary SWR calls */}
|
||||
{/* Content */}
|
||||
<div className="flex-1 overflow-y-auto overflow-x-hidden">
|
||||
{isOpen && (
|
||||
<AnimatePresence mode="wait">
|
||||
<motion.div
|
||||
key={`${context}-${activeTab}`}
|
||||
@@ -432,7 +434,6 @@ export default function UnifiedSettingsModal() {
|
||||
<TabContent context={context} activeTab={activeTab} siteId={activeSiteId} onDirtyChange={handleDirtyChange} onRegisterSave={handleRegisterSave} />
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Save bar */}
|
||||
@@ -467,6 +468,8 @@ export default function UnifiedSettingsModal() {
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user