diff --git a/js/packages/react/src/components/States/InviteCodeState.tsx b/js/packages/react/src/components/States/InviteCodeState.tsx index acb359e1..abb69ec8 100644 --- a/js/packages/react/src/components/States/InviteCodeState.tsx +++ b/js/packages/react/src/components/States/InviteCodeState.tsx @@ -1,4 +1,4 @@ -import { useEffect, useMemo, useState, type ReactElement } from "react"; +import { useEffect, useState, type ReactElement } from "react"; import { __ } from "../../lang"; import { WorldcoinIcon } from "../Icons/WorldIcon"; import { LoadingIcon } from "../Icons/LoadingIcon"; @@ -10,15 +10,6 @@ type InviteCodeStateProps = { isAwaitingUserConfirmation: boolean; }; -function extractInviteCode(uri: string): string | null { - try { - const url = new URL(uri); - return url.searchParams.get("c"); - } catch { - return null; - } -} - function useNowInSeconds(): number { const [now, setNow] = useState(() => Math.floor(Date.now() / 1000)); useEffect(() => { @@ -38,10 +29,6 @@ export function InviteCodeState({ const now = useNowInSeconds(); const secondsRemaining = codeExpiresAt !== null ? Math.max(0, codeExpiresAt - now) : null; - const inviteCode = useMemo( - () => (connectorURI ? extractInviteCode(connectorURI) : null), - [connectorURI], - ); return (
- {__("Or enter this code in World App")} -
-
- {inviteCode}
-
-
-