moderator-toolbox-nxg-for-reddit / shared/controls/useIsMod

shared/controls/useIsMod

Functions

useIsMod()

useIsMod(subreddit): boolean | null

Defined in: extension/data/shared/controls/useIsMod.ts:15

Resolves whether the current user is a moderator of subreddit. Returns null while the cached check is in flight, then true/false (failing closed to false if the lookup rejects).

Backs IsModGuard and any inline control that must both gate on mod status and read the resolved value (e.g. to kick off follow-up work only once the user is known to be a mod).

Parameters

subreddit

string

Bare subreddit name (no r/ prefix).

Returns

boolean | null