mirror of
https://github.com/khairul169/code-share.git
synced 2026-10-24 11:53:58 +07:00
feat: add homepage & auth
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { usePageContext } from "~/renderer/context";
|
||||
|
||||
export const useAuth = () => {
|
||||
const { user } = usePageContext();
|
||||
|
||||
return { user, isLoggedIn: user != null };
|
||||
};
|
||||
@@ -20,3 +20,7 @@ export const useForm = <T extends FieldValues>(
|
||||
|
||||
return form;
|
||||
};
|
||||
|
||||
export type useFormReturn<T extends FieldValues> = ReturnType<
|
||||
typeof useForm<T>
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user