add missing auth elements

This commit is contained in:
Alex Holliday committed 2025-10-09 11:06:34 -07:00
1 parent d0bb2b2ad5
commit 7378f2e33b
12 files changed
+550 -186

No files matched your search

+6 -2
View File
@@ -35,11 +35,15 @@ export const useGet = <T,>(
};
};
export const usePost = <B = any, R = any>(endpoint: string) => {
export const usePost = <B = any, R = any>() => {
const [loading, setLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
const postFn = async (body: B, config?: AxiosRequestConfig): Promise<R | null> => {
const postFn = async (
endpoint: string,
body: B,
config?: AxiosRequestConfig
): Promise<R | null> => {
setLoading(true);
setError(null);