Created
August 3, 2022 14:57
-
-
Save lao9s/0d2bb8969b1deb70c6b92a9cfeaa1902 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {usePage} from "@inertiajs/inertia-vue3"; | |
watch(() => usePage().props.value.flash, flash => { | |
if (flash.success) { | |
open('success', flash.success); | |
} | |
if (flash.warning) { | |
open('warning', flash.warning); | |
} | |
if (flash.error) { | |
open('error', flash.error); | |
} | |
if (flash.info) { | |
open('info', flash.info); | |
} | |
}, {deep: true}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment