FriendChise Docs
Announcements
Announcements route, ownership, and data flow for contributors
Announcements is an owner-gated feed with a detail page and sidebar actions.
Routes
app/(app)/orgs/[orgId]/announcements/page.tsxrenders the feed.app/(app)/orgs/[orgId]/announcements/[announcementId]/page.tsxrenders a single announcement.app/(app)/orgs/[orgId]/announcements/layout.tsxwires the page sidebar shell.
Ownership
- The list page uses
requireOrgOwnerPage(). - Owner-only actions stay hidden in the sidebar and card overflow menu.
- Members can still view a direct announcement URL in read-only mode.
UI
- The feed uses cards, pagination, and a card-first layout.
- Owners can open edit mode in the ActionSidebar.
- The overflow menu supports edit, extend expiry, and delete.
Data Flow
lib/services/announcements.tsowns queries and mutations.app/actions/announcements.tshandles auth,FormData, and revalidation.- The feed uses
getAnnouncementsPage(); the detail page usesgetAnnouncementById().
Notes
- New announcements default to a one-day expiry.
- Expiry can be extended by one day from the menu.
