Module: hooks/useSCConnectionsManager
Functions
useSCConnectionsManager
▸ useSCConnectionsManager(user?
): { acceptConnection
: undefined
; connections
: any
[] = data; emptyCache
: undefined
; isLoading
: (obj
: { id
: number
}) => boolean
; loading
: number
[] ; refresh
: undefined
; requestConnection
: undefined
; status
: undefined
} | { acceptConnection
: (user
: SCUserType
) => Promise
<any
> ; connections
: any
[] = data; emptyCache
: () => void
; isLoading
: (obj
: { id
: number
}) => boolean
; loading
: number
[] ; refresh
: () => void
; requestConnection
: (user
: SCUserType
) => Promise
<any
> ; status
: (user
: SCUserType
) => string
}
info
This custom hook is used to manage to manage friends.
How to use it:
Follow these steps:
1. const scUserContext: SCUserContextType = useSCUser();
2. const scConnectionsManager: SCConnectionsManagerType = scUserContext.manager.connections;
3. scConnectionsManager.status(user)
Parameters
Name | Type |
---|---|
user? | SCUserType |
Returns
{ acceptConnection
: undefined
; connections
: any
[] = data; emptyCache
: undefined
; isLoading
: (obj
: { id
: number
}) => boolean
; loading
: number
[] ; refresh
: undefined
; requestConnection
: undefined
; status
: undefined
} | { acceptConnection
: (user
: SCUserType
) => Promise
<any
> ; connections
: any
[] = data; emptyCache
: () => void
; isLoading
: (obj
: { id
: number
}) => boolean
; loading
: number
[] ; refresh
: () => void
; requestConnection
: (user
: SCUserType
) => Promise
<any
> ; status
: (user
: SCUserType
) => string
}