Skip to content

Documentation / @frak-labs/react-sdk / useGetUserReferralStatus

Function: useGetUserReferralStatus()

useGetUserReferralStatus(args?): UseQueryResult<UserReferralStatusType | null, FrakRpcError<undefined>>

Defined in: react/src/hook/useGetUserReferralStatus.ts:47

Hook that return a query to fetch the current user's referral status on the current merchant

Returns null when the user's identity cannot be resolved.

It's a `tanstack` wrapper around the `getUserReferralStatus()` action

Parameters

args?

Optional config object with query for customizing the underlying `useQuery()`

cacheTime?

number

Time in ms to cache the result at the core SDK level. Default: 30_000 (30s). Set to 0 to disable.

query?

QueryOptions

Optional query options, see `useQuery()` for more infos

Returns

UseQueryResult<UserReferralStatusType | null, FrakRpcError<undefined>>

The query hook wrapping the getUserReferralStatus() action The data result is a `UserReferralStatusType` or null

See