diff --git a/frontend/src/api/annonars.ts b/frontend/src/api/annonars.ts index d10cf8ce..83a3b68c 100644 --- a/frontend/src/api/annonars.ts +++ b/frontend/src/api/annonars.ts @@ -12,7 +12,6 @@ export class AnnonarsClient { } async fetchGeneInfo(hgncId: string): Promise { - console.log(`${this.apiBaseUrl}genes/info?hgnc-id=${hgncId}`) const response = await fetch(`${this.apiBaseUrl}genes/info?hgnc-id=${hgncId}`, { method: 'GET' }) diff --git a/frontend/src/api/common.ts b/frontend/src/api/common.ts index 92d3b3cd..1af5c18b 100644 --- a/frontend/src/api/common.ts +++ b/frontend/src/api/common.ts @@ -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 } diff --git a/frontend/src/views/GeneDetailView.vue b/frontend/src/views/GeneDetailView.vue index 59ed7f0a..09a191df 100644 --- a/frontend/src/views/GeneDetailView.vue +++ b/frontend/src/views/GeneDetailView.vue @@ -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' }, @@ -59,7 +59,7 @@ const sections = [
diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue index b47b742d..6009ca61 100644 --- a/frontend/src/views/HomeView.vue +++ b/frontend/src/views/HomeView.vue @@ -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 => ({ @@ -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) diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json index 8757f9df..2acff6a4 100644 --- a/frontend/tsconfig.app.json +++ b/frontend/tsconfig.app.json @@ -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": ".",