mirror of
https://github.com/teamhanko/hanko.git
synced 2025-10-27 14:17:56 +08:00
19 lines
371 B
TypeScript
19 lines
371 B
TypeScript
import { register } from "@teamhanko/hanko-elements";
|
|
import { useEffect } from "react";
|
|
|
|
const api = process.env.NEXT_PUBLIC_HANKO_API!;
|
|
|
|
interface Props {
|
|
setError(error: Error): void;
|
|
}
|
|
|
|
function HankoProfile({ setError }: Props) {
|
|
useEffect(() => {
|
|
register(api).catch(setError);
|
|
}, [setError]);
|
|
|
|
return <hanko-profile />;
|
|
}
|
|
|
|
export default HankoProfile;
|