mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 06:43:06 +00:00
fix(B123): pass notification bell as server slot in desktop header
Client component cannot import async CampaignNotificationBellSlot directly; mirror CampaignMobileTopBar slot pattern to fix staff page hangs in e2e.
This commit is contained in:
parent
32987f093f
commit
39f69e603b
3 changed files with 15 additions and 7 deletions
|
|
@ -70,3 +70,11 @@ flowchart LR
|
|||
- [x] Aceite de produto da intenção ainda coberto
|
||||
- [x] Invariantes AGENTS/engineering-standards
|
||||
- [x] Testes unit mobile top bar + metadata resolver previstos
|
||||
|
||||
## Débitos deferidos (/simplify)
|
||||
|
||||
- **Registry único** (pathRules + metadata por página): defer — gatilho quando 3ª rota dinâmica exigir override; hoje catálogo + metadata explícita é legível.
|
||||
- **Resolver único no provider** (evitar dupla resolução mobile/desktop): defer — custo negligível (~28 regex); revisit se bundle crescer.
|
||||
- **Desktop header RSC** (slot bell sem client boundary): **corrigido** nesta entrega — `notificationBell` slot como mobile.
|
||||
- **Subtitle desktop truncado** em uma linha: defer — validar com usuários; mobile já usa duas linhas.
|
||||
- **Table-driven pathRules tests**: defer — cobertura smoke suficiente para B123; expandir se matcher quebrar de novo.
|
||||
|
|
|
|||
|
|
@ -80,7 +80,9 @@ export default async function CampaignAppLayout({ children }: { children: React.
|
|||
<CampaignMobileTopBar
|
||||
notificationBell={<CampaignNotificationBellSlot user={user} />}
|
||||
/>
|
||||
<CampaignDesktopHeader user={user} />
|
||||
<CampaignDesktopHeader
|
||||
notificationBell={<CampaignNotificationBellSlot user={user} />}
|
||||
/>
|
||||
{/*
|
||||
Provider must wrap CampaignAppScrollChrome, not only page children:
|
||||
the mobile quick-actions drawer (B91/B100) mounts as a sibling of
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
'use client'
|
||||
|
||||
import { CampaignNotificationBellSlot } from '@/components/campaign/shell/CampaignNotificationBellSlot'
|
||||
import type { ReactNode } from 'react'
|
||||
|
||||
import { CampaignPageChromeDisplay } from '@/components/campaign/shell/CampaignPageChromeDisplay'
|
||||
import { SidebarTrigger } from '@/components/ui/Sidebar'
|
||||
import type { CampaignUser } from '@/payload-types'
|
||||
|
||||
export const CampaignDesktopHeader = ({ user }: { user: CampaignUser }) => (
|
||||
export const CampaignDesktopHeader = ({ notificationBell }: { notificationBell?: ReactNode }) => (
|
||||
<header className="hidden min-h-11 shrink-0 items-center gap-3 border-b border-border px-4 md:flex print:hidden">
|
||||
<SidebarTrigger />
|
||||
<CampaignPageChromeDisplay layout="desktop" className="flex-1" />
|
||||
<div className="ml-auto shrink-0">
|
||||
<CampaignNotificationBellSlot user={user} />
|
||||
</div>
|
||||
{notificationBell ? <div className="ml-auto shrink-0">{notificationBell}</div> : null}
|
||||
</header>
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue