Skip to content

Commit 8907b5e

Browse files
authored
Show the banner if there's a new message (#1045)
1 parent 8bd85b3 commit 8907b5e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stubs/inertia/resources/js/Jetstream/Banner.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<script setup>
2-
import { computed, ref } from 'vue';
2+
import { computed, ref, watch } from 'vue';
33
import { usePage } from '@inertiajs/inertia-vue3';
44
55
const show = ref(true);
66
const style = computed(() => usePage().props.value.jetstream.flash?.bannerStyle || 'success');
77
const message = computed(() => usePage().props.value.jetstream.flash?.banner || '');
8+
9+
watch(message, async () => {
10+
show.value = true;
11+
});
812
</script>
913
1014
<template>

0 commit comments

Comments
 (0)