UNPKG

@selfcommunity/react-core

Version:

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

23 lines (22 loc) 653 B
import { SCCourseLessonType } from '@selfcommunity/types'; import { CacheStrategies } from '@selfcommunity/utils'; /** :::info This custom hook is used to fetch a lesson object. ::: * @param object * @param object.id * @param object.lesson * @param object.cacheStrategy */ export default function useSCFetchLesson({ id, lesson, courseId, sectionId, cacheStrategy, }: { id?: number | string; lesson?: SCCourseLessonType; courseId: number | string; sectionId: number | string; cacheStrategy?: CacheStrategies; }): { scLesson: SCCourseLessonType; setSCLesson: (lesson: SCCourseLessonType) => void; error: string; };