mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 05:45:37 +08:00
Trigger redirct before rendering form
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { BAlert } from "bootstrap-vue";
|
||||
import { computed, onMounted } from "vue";
|
||||
import { computed } from "vue";
|
||||
import { useRouter } from "vue-router/composables";
|
||||
|
||||
import { useConfig } from "@/composables/config";
|
||||
@@ -22,13 +22,10 @@ const responseVal = computed(() => jobStore.getLatestResponse);
|
||||
const showRecommendation = computed(() => config.value.enable_tool_recommendations);
|
||||
const toolName = computed(() => responseVal.value.toolName);
|
||||
|
||||
/* lifecyle */
|
||||
onMounted(() => {
|
||||
// no response means that no tool was run in this session i.e. no data in the store
|
||||
if (Object.keys(responseVal.value).length === 0) {
|
||||
router.push(`/`);
|
||||
}
|
||||
});
|
||||
// no data means that no tool was run in this session i.e. no data in the store
|
||||
if (Object.keys(responseVal.value).length === 0) {
|
||||
router.push(`/`);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user