hooks/useSCSubscribedIncubatorsManager
Functions
useSCSubscribedIncubatorsManager()
useSCSubscribedIncubatorsManager(
user?
): {emptyCache
:undefined
;incubators
:any
[];isLoading
: (v
) =>boolean
;isSubscribed
:undefined
;loading
:any
[];refresh
:undefined
;subscribe
:undefined
; } | {emptyCache
: () =>void
;incubators
:any
[];isLoading
: (v
) =>boolean
;isSubscribed
: (incubator
) =>boolean
;loading
:any
[];refresh
: () =>void
;subscribe
: (incubator
) =>Promise
<any
>; }
This custom hook is used to manage to manage subscribed incubators.
Follow these steps:
1. const scUserContext: SCUserContextType = useSCUser();
2. const scSubscribedIncubatorsManager: SCSubscribedIncubatorsManagerType = scUserContext.managers.incubators;
3. scSubscribedIncubatorsManager.isSubscribed(incubator)
Parameters
Parameter | Type |
---|---|
user? | SCUserType |
Returns
{ emptyCache
: undefined
; incubators
: any
[]; isLoading
: (v
) => boolean
; isSubscribed
: undefined
; loading
: any
[]; refresh
: undefined
; subscribe
: undefined
; } | { emptyCache
: () => void
; incubators
: any
[]; isLoading
: (v
) => boolean
; isSubscribed
: (incubator
) => boolean
; loading
: any
[]; refresh
: () => void
; subscribe
: (incubator
) => Promise
<any
>; }