Module exposing: useMailPendingCount
// Source: https://github.com/agentscope-ai/QwenPaw | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { useCallback, useEffect, useRef, useState } from "react";
import { mailAccessControlApi } from "../../../api/modules/mailAccessControl";
const PENDING_POLLING_INTERVAL_MS = 6000;
/**
* Polls the mail access control pending list and exposes:
* - `pendingCount`: number of senders awaiting approval
* - `newArrival`: true when a pending entry not yet "seen" appears
* - `markSeen()`: mark all current pending entries as seen (stops wobble)
* - `refresh()`: manually re-fetch the pending list
*/
export const useMailPendingCount = () => {
const [pendingCount, setPendingCoun
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key