mirror of
https://github.com/teamhanko/hanko.git
synced 2025-10-27 06:06:54 +08:00
19 lines
394 B
TypeScript
19 lines
394 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({ shadow: true }).catch(setError);
|
|
}, [setError]);
|
|
|
|
return <hanko-profile api={api} />;
|
|
}
|
|
|
|
export default HankoProfile;
|