Skip to content

Commit

Permalink
fix: clicking 2 times to see the gene info
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon committed Sep 1, 2023
1 parent 655e549 commit 0e80ae3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
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()
})
})

0 comments on commit 0e80ae3

Please sign in to comment.