mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: Add loading toasts
This commit is contained in:
parent
0f2b8689c4
commit
c68fa66ff8
7 changed files with 34 additions and 4 deletions
|
|
@ -76,9 +76,11 @@ function CreateCourseModal({ closeModal, orgslug }: any) {
|
|||
thumbnail,
|
||||
session.data?.tokens?.access_token
|
||||
)
|
||||
const toast_loading = toast.loading('Creating course...')
|
||||
if (res.success) {
|
||||
await revalidateTags(['courses'], orgslug)
|
||||
setIsSubmitting(false)
|
||||
toast.dismiss(toast_loading)
|
||||
toast.success('Course created successfully')
|
||||
|
||||
if (res.data.org_id == orgId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue