mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: unpublished activities are now hidden by default
This commit is contained in:
parent
e6d7e881e3
commit
46e06201fb
14 changed files with 83 additions and 42 deletions
|
|
@ -50,7 +50,7 @@ const EditCourseStructure = (props: EditCourseStructureProps) => {
|
|||
const course = useCourse() as any
|
||||
const course_structure = course ? course.courseStructure : {}
|
||||
const course_uuid = course ? course.courseStructure.course_uuid : ''
|
||||
|
||||
const withUnpublishedActivities = course ? course.withUnpublishedActivities : false
|
||||
// New Chapter creation
|
||||
const [newChapterModal, setNewChapterModal] = useState(false)
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ const EditCourseStructure = (props: EditCourseStructureProps) => {
|
|||
// Submit new chapter
|
||||
const submitChapter = async (chapter: any) => {
|
||||
await createChapter(chapter,access_token)
|
||||
mutate(`${getAPIUrl()}courses/${course.courseStructure.course_uuid}/meta`)
|
||||
mutate(`${getAPIUrl()}courses/${course.courseStructure.course_uuid}/meta?with_unpublished_activities=${withUnpublishedActivities}`)
|
||||
await revalidateTags(['courses'], props.orgslug)
|
||||
router.refresh()
|
||||
setNewChapterModal(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue