Skip to content

Commit 2015585

Browse files
committed
fix: loading user on focus is inconsistent
1 parent 357818a commit 2015585

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

resources/js/App.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script setup lang="ts">
22
import type { ToastPostion } from '@aminnausin/cedar-ui';
33
4-
import { onMounted, onUnmounted, ref } from 'vue';
54
import { DrawerController } from './components/cedar-ui/drawer';
65
import { ToastController } from '@/components/cedar-ui/toast';
6+
import { onMounted, ref } from 'vue';
77
import { useFullscreen } from '@/composables/useFullscreen';
88
import { getScreenSize } from '@/service/util';
99
import { useAuthStore } from '@/stores/AuthStore';
@@ -28,12 +28,6 @@ onMounted(async () => {
2828
2929
toastPosition.value = getScreenSize() === 'default' ? 'top-center' : 'bottom-left';
3030
loadUser();
31-
32-
window.addEventListener('focus', loadUser);
33-
});
34-
35-
onUnmounted(() => {
36-
window.removeEventListener('focus', loadUser);
3731
});
3832
</script>
3933

0 commit comments

Comments
 (0)