This repository was archived by the owner on Oct 31, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +25
-114
lines changed
Expand file tree Collapse file tree 4 files changed +25
-114
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import axios from 'axios' ;
2- import yaml from 'js-yaml' ;
32
4- export default async function getNewsItems ( ) {
5- const newsUrl = `${ process . env . BASE_URL } news.yaml` ;
6- const newsResponse = await axios . get ( newsUrl ) ;
73
4+ export default async function getNewsItems ( ) {
5+ const monarchRss = 'https://api.rss2json.com/v1/api.json?rss_url=https://medium.com/feed/@monarchinit' ;
86 let newsItems = [ ] ;
7+
98 try {
10- const newsParsed = yaml . safeLoad ( newsResponse . data , 'utf8' ) ;
11- newsItems = newsParsed . news . items ;
9+ const newsResponse = await axios . get ( monarchRss ) ;
10+ newsItems = newsResponse . data . items . map ( elem => ( {
11+ url : elem . link ,
12+ date : new Date ( elem . pubDate ) . toDateString ( ) . slice ( 4 ) ,
13+ title : elem . title
14+ } ) ) ;
1215 } catch ( e ) {
13- // console.log('getNewsItems yaml.safeLoad ERROR ', e);
16+ // console.log('ERROR fetching and parsing medium RSS ', e);
1417 }
15-
1618 return newsItems ;
1719}
Original file line number Diff line number Diff line change 8282 </div >
8383
8484 <div v-if =" inheritance" class =" col-12 node-content-section" >
85- <b >Heritability: </b >  ; {{ inheritance }}
85+ <b >Heritability: </b >  ; {{ inheritance }}
8686 </div >
8787
8888 <div v-if =" modifiers" class =" col-12 node-content-section" >
89- <b >Clinical Modifiers: </b >  ; {{ modifiers }}
89+ <b >Clinical Modifiers: </b >  ; {{ modifiers }}
9090 </div >
9191 </div >
9292
117117 </div >
118118
119119 <div v-if =" !expandedCard" class =" row" >
120-
121- <div v-if =" nodeType === 'disease'" class =" col-12" >
122-
120+ <div v-if =" nodeType === 'disease' || nodeType === 'phenotype'" class =" col-12" >
123121 <div v-if =" synonyms && synonyms['Exact Synonym'].length" class =" node-content-section" >
124122 <b >Exact Synonyms:</b >  ; {{ synonyms['Exact Synonym'].join(', ') }}
125123 </div >
135133 <div v-if =" synonyms && synonyms['Related Synonym'].length" class =" node-content-section" >
136134 <b >Related Synonyms:</b >  ; {{ synonyms['Related Synonym'].join(', ') }}
137135 </div >
138-
139136 </div >
140137
141138 <div v-else class =" col-12" >
142139 <div v-if =" synonyms && synonyms['Exact Synonym'].length" class =" node-content-section" >
143140 <b >Synonyms:</b >  ; {{ synonyms['Exact Synonym'].join(', ') }}
144141 </div >
145142 </div >
146-
147143 </div >
148144
149145 <div v-if =" !expandedCard && hasGeneExac" class =" row py-2" >
You can’t perform that action at this time.
0 commit comments