import { useMutation } from '@tanstack/react-query'; import { axiosClient } from '@/lib/axios'; interface GetMagicLinkPayload { email: string; turnstile_token: string; } export function useGetMagicLink() { return useMutation({ mutationFn: async (payload: GetMagicLinkPayload) => { return axiosClient.post('/auth/magic', payload); }, }); }