refactor(editor): Remove unncessary props and simplify code for tiptap editor, update all editors for the same

This commit is contained in:
Abhinav Raut
2025-06-06 03:02:11 +05:30
parent d532a99771
commit cc1432b3e4
11 changed files with 62 additions and 228 deletions

View File

@@ -248,18 +248,10 @@ const fetchBusinessHours = async () => {
})
businessHours.value = response.data.data
} catch (error) {
// If unauthorized (no permission), show a toast message.
if (error.response.status === 403) {
emitter.emit(EMITTER_EVENTS.SHOW_TOAST, {
variant: 'destructive',
description: t('admin.businessHours.unauthorized')
})
} else {
emitter.emit(EMITTER_EVENTS.SHOW_TOAST, {
variant: 'destructive',
description: handleHTTPError(error).message
})
}
emitter.emit(EMITTER_EVENTS.SHOW_TOAST, {
variant: 'destructive',
description: handleHTTPError(error).message
})
}
}