design: confirm message with daisyui design

This commit is contained in:
Julien Calixte
2024-12-29 01:12:54 +01:00
parent 6a84c92f4f
commit c93e4a8b16
6 changed files with 22 additions and 11 deletions

View File

@@ -1,12 +1,14 @@
<script setup lang="ts">
import { useOfflineNotes } from '@/hooks/useOfflineNotes.hook'
import { confirmMessage } from '@/utils/notif'
const { cacheAllNotes, isLoading, totalOfNotes, noteCompleted } =
useOfflineNotes()
const confirmBeforeCachingAllNotes = () => {
const confirmBeforeCachingAllNotes = async () => {
confirm('Do you want to cache all notes?')
cacheAllNotes()
await cacheAllNotes()
confirmMessage('✅ All notes have been locally saved')
}
</script>