UNPKG

@selfcommunity/react-core

Version:

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

49 lines (48 loc) 1.39 kB
import { SCCommentsOrderBy, SCCourseCommentType, SCCourseLessonType } from '@selfcommunity/types'; import { CacheStrategies } from '@selfcommunity/utils'; /** * Interface SCLessonCommentsObjectType */ export interface SCLessonCommentsObjectType { componentLoaded: boolean; comments: SCCourseCommentType[]; 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 commentsObjectActionTypes: { LOADING_NEXT: string; LOADING_PREVIOUS: string; DATA_NEXT_LOADED: string; DATA_PREVIOUS_LOADED: string; DATA_RELOAD: string; DATA_RELOADED: string; DATA_REVALIDATE: string; }; /** :::info This custom hooks is used to fetch paginated comments for a specific course lesson. ::: * @param props */ export default function useSCFetchLessonCommentObjects(props: { id?: number; lessonObject?: SCCourseLessonType; offset?: number; pageSize?: number; orderBy?: SCCommentsOrderBy; parent?: number; onChangePage?: (page: any) => any; cacheStrategy?: CacheStrategies; }): any;