feat: upon clicking Save, redirect to Exercises page (#163)
* fix: redirect to exercises page after editing * removed console.log * Update apps/dashboard/src/lib/components/Course/components/Lesson/Exercise/index.svelte Co-authored-by: Rotimi Best <[email protected]> --------- Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
co-authored by
Rotimi Best
parent
b4da5b8625
commit
78d545dd2e
@@ -1,5 +1,6 @@
|
||||
<script>
|
||||
import { onDestroy } from 'svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
import AddAltIcon from 'carbon-icons-svelte/lib/AddAlt.svelte';
|
||||
import ViewIcon from 'carbon-icons-svelte/lib/View.svelte';
|
||||
import ViewFilledIcon from 'carbon-icons-svelte/lib/ViewFilled.svelte';
|
||||
@@ -61,6 +62,9 @@
|
||||
questions: updatedQuestions
|
||||
}));
|
||||
snackbar.success('Saved Successfully');
|
||||
|
||||
// Redirect to exercises page
|
||||
goto(path);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
snackbar.error();
|
||||
|
||||
Reference in New Issue
Block a user