Signup flow

This commit is contained in:
2023-07-20 12:33:00 +01:00
parent a1605e31d5
commit c74bbae5c7
24 changed files with 389 additions and 77 deletions

View File

@ -1,9 +1,17 @@
import { Login } from "index";
import { getPublisher } from "login";
import { useSyncExternalStore } from "react";
export function useLogin() {
return useSyncExternalStore(
const session = useSyncExternalStore(
(c) => Login.hook(c),
() => Login.snapshot()
);
if (!session) return;
return {
...session,
publisher: () => {
return getPublisher(session);
}
}
}