MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / useMe

Function useMe

apps/ui/src/features/auth/Auth.queries.ts:22–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 * fallback is the user-facing retry surface.
21 */
22export function useMe(): UseQueryResult<IMe | null> {
23 return useQuery<IMe | null>({
24 queryKey: AUTH_QUERY_KEYS.me,
25 queryFn: async () => {
26 const { data } = await apiClient.GET("/api/v1/users/me");
27
28 return isAuthenticatedMe(data) ? data : null;
29 },
30 staleTime: 60_000,
31 retry: false
32 });
33}
34
35export function useMfaStatus(): UseQueryResult<IMfaStatusResponse | null> {
36 return useQuery<IMfaStatusResponse | null>({

Callers 15

useAppShellFunction · 0.90
useAppSidebarFunction · 0.90
useNotificationStreamFunction · 0.90
useJoinRequestsPageFunction · 0.90
useAuditLogPageFunction · 0.90
useInvitationsPageFunction · 0.90
useSettingsPageFunction · 0.90
useAccountSwitcherFunction · 0.90
useProfilePageFunction · 0.90
useBillingPageFunction · 0.90
useDashboardPageFunction · 0.90

Calls 1

isAuthenticatedMeFunction · 0.90

Tested by

no test coverage detected