"use client";
import { ZeroXKeyProvider, useZeroXKey } from "@0xkey-io/react-wallet-kit";
const config = {
organizationId: process.env.NEXT_PUBLIC_ORGANIZATION_ID!,
authProxyConfigId: process.env.NEXT_PUBLIC_AUTH_PROXY_CONFIG_ID!,
};
function LoginButton() {
const { handleLogin } = useZeroXKey();
return <button onClick={handleLogin}>Log in</button>;
}
export function App({ children }: { children: React.ReactNode }) {
return (
<ZeroXKeyProvider config={config}>
{children}
<LoginButton />
</ZeroXKeyProvider>
);
}