Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon committed Aug 23, 2023
1 parent 6254d7b commit c4f00fc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 19 deletions.
1 change: 0 additions & 1 deletion frontend/src/api/annonars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export class AnnonarsClient {
}

async fetchGeneInfo(hgncId: string): Promise<any> {
console.log(`${this.apiBaseUrl}genes/info?hgnc-id=${hgncId}`)
const response = await fetch(`${this.apiBaseUrl}genes/info?hgnc-id=${hgncId}`, {
method: 'GET'
})
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/api/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
const API_BASE_PREFIX =
export const API_BASE_PREFIX =
import.meta.env.MODE == 'development' ? '//localhost:8080/proxy/annonars' : '/proxy/annonars'

export { API_BASE_PREFIX }
4 changes: 2 additions & 2 deletions frontend/src/views/GeneDetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ onMounted(loadDataToStore)
watch(() => props.searchTerm, loadDataToStore)
watch(() => route.hash, scrollToSection)
const sections = [
const SECTIONS = [
{ id: 'hgnc', title: 'HGNC' },
{ id: 'constraints-scores', title: 'Constraints / Scores' },
{ id: 'ncbi-summary', title: 'NCBI Summary' },
Expand All @@ -59,7 +59,7 @@ const sections = [
<div v-if="geneInfoStore.storeState == StoreState.Active" class="gene-info">
<v-list density="compact" nav>
<v-list-item
v-for="section in sections"
v-for="section in SECTIONS"
:key="section.id"
@click="router.push({ hash: `#${section.id}` })"
>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type RouteLoctionBuilder = () => RouteLocationFragment
// We iterate the regexps in the `Map` and will use the route from the
// first match.
const searchRegexp: [RegExp, RouteLoctionBuilder][] = [
const SEARCH_REGEXPS: [RegExp, RouteLoctionBuilder][] = [
[
/^.*$/,
(): RouteLocationFragment => ({
Expand All @@ -51,7 +51,7 @@ const searchRegexp: [RegExp, RouteLoctionBuilder][] = [
]
const performSearch = async () => {
for (const [regexp, getRoute] of searchRegexp) {
for (const [regexp, getRoute] of SEARCH_REGEXPS) {
if (regexp.test(searchTerm.value)) {
const routeLocation = getRoute()
console.log(`term {searchTerm.value} matched {regexp}, route is`, routeLocation)
Expand Down
12 changes: 1 addition & 11 deletions frontend/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": [
"env.d.ts",
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"src/**/*.js",
"src/**/*.jsx",
"src/**/*.json",
"src/**/*.d.ts",
"src/api/utils.ts"
],
"include": ["env.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "src/**/*.js"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"baseUrl": ".",
Expand Down

0 comments on commit c4f00fc

Please sign in to comment.