moderator-toolbox-nxg-for-reddit / modules/announcements/components/AnnouncementBuilderPopup

modules/announcements/components/AnnouncementBuilderPopup

Functions

AnnouncementBuilderPopup()

AnnouncementBuilderPopup(__namedParameters): Element

Defined in: extension/data/modules/announcements/components/AnnouncementBuilderPopup.tsx:80

Renders the announcement composer with a live card preview. Creates a new note (optionally scheduled or linked to the attached post) or, when initialNote is given, edits a still-scheduled one.

Parameters

__namedParameters

Props

Returns

Element


openAnnouncementBuilder()

openAnnouncementBuilder(opts?): void

Defined in: extension/data/modules/announcements/components/AnnouncementBuilderPopup.tsx:278

Imperatively mounts the announcement composer. Deduplicates per note (so two edits of different notes don’t collide, but re-opening the same one reveals it).

Parameters

opts?
initialNote?

AnnouncementNote

Existing note to edit instead of creating one.

onSaved?

() => void

Called after a successful save (e.g. to refresh a list).

Returns

void