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
|
|
@ -234,7 +234,9 @@ const DeleteUpdateButton = ({ update }: any) => {
|
|||
|
||||
const handleDelete = async () => {
|
||||
const res = await deleteCourseUpdate(course.courseStructure.course_uuid, update.courseupdate_uuid, session.data?.tokens?.access_token)
|
||||
const toast_loading = toast.loading('Deleting update...')
|
||||
if (res.status === 200) {
|
||||
toast.dismiss(toast_loading)
|
||||
toast.success('Update deleted successfully')
|
||||
mutate(`${getAPIUrl()}courses/${course?.courseStructure.course_uuid}/updates`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue