🐛 Fix code in wrong place
This commit is contained in:
		| @@ -23,7 +23,10 @@ | ||||
| import { useRealms } from "@/stores/realms" | ||||
| import { getAtk } from "@/stores/userinfo" | ||||
| import { ref } from "vue" | ||||
| import { useRoute, useRouter } from "vue-router" | ||||
|  | ||||
| const route = useRoute() | ||||
| const router = useRouter() | ||||
| const realms = useRealms() | ||||
|  | ||||
| const emits = defineEmits(["relist"]) | ||||
| @@ -48,6 +51,9 @@ async function deletePost() { | ||||
|     realms.show.delete = false | ||||
|     realms.related.delete_to = null | ||||
|     emits("relist") | ||||
|     if (route.name?.toString()?.startsWith("realm")) { | ||||
|       router.push({ name: "explore" }) | ||||
|     } | ||||
|   } | ||||
|   loading.value = false | ||||
| } | ||||
|   | ||||
| @@ -31,10 +31,7 @@ | ||||
| import { ref, watch } from "vue" | ||||
| import { getAtk } from "@/stores/userinfo" | ||||
| import { useRealms } from "@/stores/realms" | ||||
| import { useRoute, useRouter } from "vue-router" | ||||
|  | ||||
| const route = useRoute() | ||||
| const router = useRouter() | ||||
| const emits = defineEmits(["relist"]) | ||||
|  | ||||
| const realms = useRealms() | ||||
| @@ -76,10 +73,6 @@ async function submit(evt: SubmitEvent) { | ||||
|     realms.done = true | ||||
|     realms.show.editor = false | ||||
|     realms.related.edit_to = null | ||||
|  | ||||
|     if (route.name?.toString()?.startsWith("realm")) { | ||||
|       router.push({ name: "explore" }) | ||||
|     } | ||||
|   } | ||||
|   loading.value = false | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user