Added sockets for notifications
This commit is contained in:
@@ -4,11 +4,14 @@ import MainFooter from "@/Components/FlightsGoneBy/MainFooter.vue";
|
||||
import Radar from "@/Components/FlightsGoneBy/Radar.vue";
|
||||
import StatusNotifications from "@/Components/FlightsGoneBy/StatusNotifications.vue";
|
||||
import ToastNotifications from "@/Components/FlightsGoneBy/ToastNotifications.vue";
|
||||
import { router } from "@inertiajs/vue3";
|
||||
import {router, usePage} from "@inertiajs/vue3";
|
||||
import { ref } from "vue";
|
||||
|
||||
import NotificationListener from "@/Components/FlightsGoneBy/NotificationListener.vue";
|
||||
import {SharedProps} from "@/Types/types";
|
||||
const transitionKey = ref(0);
|
||||
|
||||
const page = usePage<SharedProps>().props
|
||||
|
||||
router.on('success', () => {
|
||||
transitionKey.value++;
|
||||
});
|
||||
@@ -25,6 +28,7 @@ router.on('success', () => {
|
||||
</Transition>
|
||||
<MainFooter :key="`footer-${transitionKey}`" />
|
||||
</div>
|
||||
<NotificationListener v-if="page.auth.user?.id" :user-id="page.auth.user?.id" />
|
||||
<StatusNotifications />
|
||||
<ToastNotifications />
|
||||
</Radar>
|
||||
|
||||
Reference in New Issue
Block a user