From b56d173f8af7481f867a53bff7666d9ab8340d28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?=
 <root@acid-chicken.com>
Date: Sat, 25 Mar 2023 12:20:49 +0900
Subject: [PATCH] chore: use defaultStore instead

---
 packages/frontend/src/components/MkContextMenu.vue | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/packages/frontend/src/components/MkContextMenu.vue b/packages/frontend/src/components/MkContextMenu.vue
index 21cccaabde..99ecd0808f 100644
--- a/packages/frontend/src/components/MkContextMenu.vue
+++ b/packages/frontend/src/components/MkContextMenu.vue
@@ -1,10 +1,10 @@
 <template>
 <Transition
 	appear
-	:enter-active-class="$store.state.animation ? $style.transition_fade_enterActive : ''"
-	:leave-active-class="$store.state.animation ? $style.transition_fade_leaveActive : ''"
-	:enter-from-class="$store.state.animation ? $style.transition_fade_enterFrom : ''"
-	:leave-to-class="$store.state.animation ? $style.transition_fade_leaveTo : ''"
+	:enter-active-class="animation ? $style.transition_fade_enterActive : ''"
+	:leave-active-class="animation ? $style.transition_fade_leaveActive : ''"
+	:enter-from-class="animation ? $style.transition_fade_enterFrom : ''"
+	:leave-to-class="animation ? $style.transition_fade_leaveTo : ''"
 >
 	<div ref="rootEl" :class="$style.root" :style="{ zIndex }" @contextmenu.prevent.stop="() => {}">
 		<MkMenu :items="items" :align="'left'" @close="$emit('closed')"/>
@@ -17,6 +17,7 @@ import { onMounted, onBeforeUnmount } from 'vue';
 import MkMenu from './MkMenu.vue';
 import { MenuItem } from './types/menu.vue';
 import contains from '@/scripts/contains';
+import { defaultStore } from '@/store';
 import * as os from '@/os';
 
 const props = defineProps<{
@@ -28,6 +29,8 @@ const emit = defineEmits<{
 	(ev: 'closed'): void;
 }>();
 
+const animation = $computed(() => defaultStore.state.animation);
+
 let rootEl = $shallowRef<HTMLDivElement>();
 
 let zIndex = $ref<number>(os.claimZIndex('high'));