- Collections Notification e PushSubscription com migration - Sino no header (mobile + desktop) com drawer de avisos lidos/não lidos - Hooks em municipalityUpdate, supporter, activity e convite aceito - Push Web via web-push + handlers no service worker /campanha/sw.js - Opt-in LGPD em /campanha/perfil (chave campanha-notificacoes-push) - Testes unit/int de contrato e access Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
17 lines
654 B
TypeScript
17 lines
654 B
TypeScript
import { loadNotificationBellData } from '@/app/(campaign)/campanha/actions/notifications'
|
|
import { CampaignNotificationBell } from '@/components/campaign/shell/CampaignNotificationBell'
|
|
import { isStaffCampaignRole } from '@/lib/campaignRoles'
|
|
import type { CampaignUser } from '@/payload-types'
|
|
|
|
type CampaignNotificationBellSlotProps = {
|
|
user: CampaignUser
|
|
}
|
|
|
|
export const CampaignNotificationBellSlot = async ({ user }: CampaignNotificationBellSlotProps) => {
|
|
if (!isStaffCampaignRole(user.role)) return null
|
|
|
|
const bellData = await loadNotificationBellData()
|
|
if (!bellData) return null
|
|
|
|
return <CampaignNotificationBell {...bellData} />
|
|
}
|