moderator-toolbox-nxg-for-reddit / modules/modmatrix/components/useDrilldownFetch

modules/modmatrix/components/useDrilldownFetch

Functions

useDrilldownFetch()

useDrilldownFetch(subredditUrl, actionCode, mod): object

Defined in: extension/data/modules/modmatrix/components/useDrilldownFetch.ts:15

Fetches up to 20 recent mod-log entries for the given moderator and action type. Re-fetches whenever subredditUrl, actionCode, or mod changes.

Parameters

subredditUrl

string

Absolute URL of the subreddit (e.g. https://www.reddit.com/r/example/).

actionCode

string

Reddit API action type code (e.g. removelink).

mod

string

Username of the moderator.

Returns

object

entries (null while loading) and error.

entries

entries: ModLogEntry[] | null

error

error: boolean