MCPcopy Create free account
hub / github.com/codeaashu/claude-code / MailboxProvider

Function MailboxProvider

src/context/mailbox.tsx:8–30  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

6 children: React.ReactNode;
7};
8export function MailboxProvider(t0) {
9 const $ = _c(3);
10 const {
11 children
12 } = t0;
13 let t1;
14 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
15 t1 = new Mailbox();
16 $[0] = t1;
17 } else {
18 t1 = $[0];
19 }
20 const mailbox = t1;
21 let t2;
22 if ($[1] !== children) {
23 t2 = <MailboxContext.Provider value={mailbox}>{children}</MailboxContext.Provider>;
24 $[1] = children;
25 $[2] = t2;
26 } else {
27 t2 = $[2];
28 }
29 return t2;
30}
31export function useMailbox() {
32 const mailbox = useContext(MailboxContext);
33 if (!mailbox) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected