fix: add missing auth hooks for gacha and dimentorin builds

Added missing React Query hooks that were being imported but not exported:
- usePostLogin
- usePostRegister
- usePostVerifyEmail
- usePostSendOtp
- useGoogleCallback

These hooks wrap the existing auth API functions with React Query's useMutation.

Fixes build errors:
- gacha:build - "usePostVerifyEmail" is not exported
- dimentorin:build - "useGoogleCallback" is not exported

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Maulana Sodiqin
2025-11-25 09:49:51 +07:00
co-authored by Claude
parent 1cb2443b58
commit 31736cc403
+34
View File
@@ -1,7 +1,41 @@
import { supabase } from '../../supabase';
import { useMutation } from '@tanstack/react-query';
import * as authApi from '../../api/auth';
export * from './use-auth-store';
// React Query hooks for auth API
export const usePostLogin = () => {
return useMutation({
mutationFn: authApi.postLogin,
});
};
export const usePostRegister = () => {
return useMutation({
mutationFn: authApi.postRegister,
});
};
export const usePostVerifyEmail = () => {
return useMutation({
mutationFn: authApi.postVerifyEmail,
});
};
export const usePostSendOtp = () => {
return useMutation({
mutationFn: authApi.postSendOtp,
});
};
export const useGoogleCallback = () => {
return useMutation({
mutationFn: ({ code, state }: { code: string; state: string }) =>
authApi.postGoogleCallback(code, state),
});
};
// Supabase GitHub OAuth hook
export const useGitHubAuth = () => {
const signInWithGitHub = async () => {