UNPKG

@selfcommunity/react-core

Version:

React Core Components useful for integrating UI Community components (react-ui).

47 lines (46 loc) 1.33 kB
import { SCContributionType, SCFeedObjectType, SCUserType } from '@selfcommunity/types'; import { CacheStrategies } from '@selfcommunity/utils'; /** * Interface SCCommentsObjectType */ export interface SCPaginatedContributorsType { componentLoaded: boolean; contributors: SCUserType[]; total: number; next: string; previous: string; isLoadingNext: boolean; isLoadingPrevious: boolean; page: number; reload: boolean; } /** * @hidden * We have complex state logic that involves multiple sub-values, * so useReducer is preferable to useState. * Define all possible auth action types label * Use this to export actions and dispatch an action */ export declare const contributorsObjectActionTypes: { LOADING_NEXT: string; LOADING_PREVIOUS: string; DATA_NEXT_LOADED: string; DATA_PREVIOUS_LOADED: string; DATA_RELOAD: string; DATA_RELOADED: string; }; /** :::info This custom hooks is used to fetch paginated contributors. ::: * @param props */ export default function useSCFetchContributors(props: { id?: number; feedObject?: SCFeedObjectType; feedObjectType: Exclude<SCContributionType, SCContributionType.COMMENT>; offset?: number; pageSize?: number; onChangePage?: (page: any) => any; cacheStrategy?: CacheStrategies; }): any;