Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Search works only from second time (#23, #24) #30

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions frontend/src/components/HeaderDetailPage.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<script setup lang="ts">
import { useRouter } from 'vue-router'
import { useGeneInfoStore } from '@/stores/geneInfo'

const router = useRouter()

const geneInfoStore = useGeneInfoStore()

if (geneInfoStore.geneInfo === null) {
router.push({ name: 'home' })
}
</script>

<template>
<v-app-bar app class="top-bar">
<v-toolbar-title>
Expand Down
11 changes: 0 additions & 11 deletions frontend/src/components/__tests__/HeaderDetailPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,4 @@ describe('HeaderDetailPage', async () => {
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
})

it('redirects if gene data is null', async () => {
const store = useGeneInfoStore()
store.storeState = StoreState.Initial
store.geneSymbol = null
store.geneInfo = null

makeWrapper()

expect(router.push).toHaveBeenCalled()
})
})
2 changes: 1 addition & 1 deletion frontend/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const router = createRouter({
/** The default page title */
const DEFAULT_TITLE = 'REEV Explains and Evaluates Variants'

router.afterEach((to, _from) => {
router.afterEach((to) => {
// Use next tick to handle router history correctly
// see: https://github.com/vuejs/vue-router/issues/914#issuecomment-384477609
nextTick(() => {
Expand Down
Loading