feat: sign-in nip7

This commit is contained in:
2024-09-23 13:28:45 +01:00
parent fb438c0dbc
commit eae46663d5
32 changed files with 596 additions and 361 deletions

12
src/hooks/login.tsx Normal file
View File

@ -0,0 +1,12 @@
import { useSyncExternalStore } from "react";
import { Login } from "../login";
export default function useLogin() {
return useSyncExternalStore(
(c) => {
Login?.on("change", c);
return () => Login?.off("change", c);
},
() => Login,
);
}