mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: mutations issues + trail + next canary bump
This commit is contained in:
parent
7583752362
commit
5cbf9f809c
11 changed files with 205 additions and 121 deletions
|
|
@ -18,6 +18,9 @@ const CollectionAdminEditsArea = (props: any) => {
|
|||
// reload the page
|
||||
router.refresh();
|
||||
router.push(getUriWithOrg(props.orgslug, "/collections"));
|
||||
|
||||
// refresh page (FIX for Next.js BUG)
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ function NewCollection(params: any) {
|
|||
router.prefetch(getUriWithOrg(orgslug, "/collections"));
|
||||
router.push(getUriWithOrg(orgslug, "/collections"));
|
||||
router.refresh();
|
||||
|
||||
// refresh page (FIX for Next.js BUG)
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,10 @@ export function MarkStatus(props: { activityid: string, course: any, orgslug: st
|
|||
async function markActivityAsCompleteFront() {
|
||||
const trail = await markActivityAsComplete(props.orgslug, props.courseid, props.activityid);
|
||||
router.refresh();
|
||||
|
||||
// refresh page (FIX for Next.js BUG)
|
||||
window.location.reload();
|
||||
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ const CourseClient = (props: any) => {
|
|||
await startCourse("course_" + courseid, orgslug);
|
||||
revalidateTags(['courses']);
|
||||
router.refresh();
|
||||
|
||||
// refresh page (FIX for Next.js BUG)
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
async function quitCourse() {
|
||||
|
|
@ -32,6 +35,9 @@ const CourseClient = (props: any) => {
|
|||
// Mutate course
|
||||
revalidateTags(['courses']);
|
||||
router.refresh();
|
||||
|
||||
// refresh page (FIX for Next.js BUG)
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ function OrganizationClient(props: any) {
|
|||
revalidateTags(['organizations']);
|
||||
router.refresh();
|
||||
|
||||
// refresh page (FIX for Next.js BUG)
|
||||
window.location.reload();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue