final touches for beta skymoney (at least i think)

This commit is contained in:
2026-01-18 00:00:44 -06:00
parent 4eae966f96
commit f4f0ae5df2
161 changed files with 26016 additions and 1966 deletions

View File

@@ -0,0 +1,16 @@
import { useQuery, type UseQueryOptions } from "@tanstack/react-query";
import { http } from "../api/http";
type SessionResponse = { ok: true; userId: string; email: string | null; displayName: string | null };
type Options = Omit<UseQueryOptions<SessionResponse, Error>, "queryKey" | "queryFn">;
export function useAuthSession(options?: Options) {
return useQuery<SessionResponse, Error>({
queryKey: ["auth", "session"],
queryFn: async () =>
http<SessionResponse>("/auth/session", { skipAuthRedirect: true }),
retry: false,
...options,
});
}