Set default parameter values for useCampaigns.
This commit is contained in:
parent
458c16bad9
commit
11683be1a8
|
@ -27,13 +27,10 @@ type UseCampaignsType = {
|
||||||
/**
|
/**
|
||||||
* Custom hook to get campaigns.
|
* Custom hook to get campaigns.
|
||||||
*
|
*
|
||||||
* @param page Page number. First page is `1`.
|
* @param page Page number. Default is `1`.
|
||||||
* @param perPage Page size, i.e. number of records in one page.
|
* @param perPage Page size, i.e. number of records in one page. Default is `5`.
|
||||||
*/
|
*/
|
||||||
export const useCampaigns = (
|
export const useCampaigns = ( page = 1, perPage = 5 ): UseCampaignsType => {
|
||||||
page: number,
|
|
||||||
perPage: number
|
|
||||||
): UseCampaignsType => {
|
|
||||||
const { data: channels } = useRegisteredChannels();
|
const { data: channels } = useRegisteredChannels();
|
||||||
|
|
||||||
return useSelect(
|
return useSelect(
|
||||||
|
|
Loading…
Reference in New Issue