Module: hooks/useSCSubscribedIncubatorsManager
Functions
useSCSubscribedIncubatorsManager
▸ useSCSubscribedIncubatorsManager(user?
): { emptyCache
: undefined
; incubators
: any
[] = data; isLoading
: (v
: number
| { id
: number
}) => boolean
; isSubscribed
: undefined
; loading
: any
[] ; refresh
: undefined
; subscribe
: undefined
} | { emptyCache
: () => void
; incubators
: any
[] = data; isLoading
: (v
: number
| { id
: number
}) => boolean
; isSubscribed
: (incubator
: SCIncubatorType
) => boolean
; loading
: any
[] ; refresh
: () => void
; subscribe
: (incubator
: SCIncubatorType
) => 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
Name | Type |
---|---|
user? | SCUserType |
Returns
{ emptyCache
: undefined
; incubators
: any
[] = data; isLoading
: (v
: number
| { id
: number
}) => boolean
; isSubscribed
: undefined
; loading
: any
[] ; refresh
: undefined
; subscribe
: undefined
} | { emptyCache
: () => void
; incubators
: any
[] = data; isLoading
: (v
: number
| { id
: number
}) => boolean
; isSubscribed
: (incubator
: SCIncubatorType
) => boolean
; loading
: any
[] ; refresh
: () => void
; subscribe
: (incubator
: SCIncubatorType
) => Promise
<any
> }
Defined in
packages/react-core/src/hooks/useSCSubscribedIncubatorsManager.ts:22