@cfxdevkit/wallet-connect / useIsAdmin
Function: useIsAdmin()
useIsAdmin():
boolean
Defined in: useIsAdmin.ts:35
useIsAdmin — returns true if the connected wallet address is in the
NEXT_PUBLIC_ADMIN_ADDRESSES whitelist.
The env var accepts a comma-separated list of checksummed or lowercase
0x addresses. When absent or empty, every address returns false,
keeping privileged UI hidden until an admin list is configured.
Returns
boolean
Example
const isAdmin = useIsAdmin();
if (isAdmin) return <SafetyPanel />;