mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: data revalidation for collections and courses
fix: add collections tag to request
This commit is contained in:
parent
b582eaacfc
commit
7f4c2c7738
13 changed files with 28 additions and 23 deletions
|
|
@ -43,13 +43,13 @@ function CreateCourseModal({ closeModal, orgslug }: any) {
|
|||
e.preventDefault();
|
||||
setIsSubmitting(true);
|
||||
let status = await createNewCourse(orgId, { name, description }, thumbnail);
|
||||
revalidateTags(['courses'], orgslug);
|
||||
await revalidateTags(['courses'], orgslug);
|
||||
setIsSubmitting(false);
|
||||
|
||||
if (status.org_id == orgId) {
|
||||
closeModal();
|
||||
router.refresh();
|
||||
revalidateTags(['courses'], orgslug);
|
||||
await revalidateTags(['courses'], orgslug);
|
||||
|
||||
// refresh page (FIX for Next.js BUG)
|
||||
// window.location.reload();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue