feat: add homepage & auth

This commit is contained in:
2024-02-23 19:36:10 +07:00
parent d579c1b7c5
commit 735fa9354b
42 changed files with 981 additions and 70 deletions
+7
View File
@@ -0,0 +1,7 @@
import { usePageContext } from "~/renderer/context";
export const useAuth = () => {
const { user } = usePageContext();
return { user, isLoggedIn: user != null };
};
+4
View File
@@ -20,3 +20,7 @@ export const useForm = <T extends FieldValues>(
return form;
};
export type useFormReturn<T extends FieldValues> = ReturnType<
typeof useForm<T>
>;