fix(FE): life cycle hook
This commit is contained in:
parent
acd6f547ad
commit
c6f2e2d1b8
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import {computed, onMounted, onBeforeUnmount, ref} from "vue";
|
||||
import {computed, onActivated, onDeactivated, ref} from "vue";
|
||||
import {useAuthStore} from "@/stores/auth.store.ts";
|
||||
import {deleteShow} from "@models/show/show.ts";
|
||||
import {baseShowInstance, deleteShowInstance, getShowInstances} from "@models/show/showInstance.ts";
|
||||
|
@ -76,7 +76,7 @@ const goBack = async () => {
|
|||
// so reducing the network calls sent
|
||||
// That requires the handling of the context menu
|
||||
// and the show/instance id in a different way though
|
||||
onMounted(async () => {
|
||||
onActivated(async () => {
|
||||
await triggerFetchShowInstances(new Date());
|
||||
intervalId = setInterval(async () => {
|
||||
if (!isRunning.value) {
|
||||
|
@ -85,7 +85,7 @@ onMounted(async () => {
|
|||
}, 1000);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
onDeactivated(() => {
|
||||
clearInterval(intervalId);
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue