File tree Expand file tree Collapse file tree 1 file changed +23
-11
lines changed
Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Original file line number Diff line number Diff line change 11import { Title } from '@/components' ;
2- import { research } from '@/data' ;
2+ import { research , publications } from '@/data' ;
33
44const Research = ( ) => {
55 const data = research . data ;
6-
6+ const pubIndex = new Map (
7+ publications . map ( p => [ p . Id , { title : p . Title , arxiv : p . ArXiv } ] )
8+ ) ;
9+
710 return (
811 < div className = "pages" >
912 < Title name = "Research" />
@@ -46,15 +49,24 @@ const Research = () => {
4649 < span className = "font-bold" > { 'Publications: ' } </ span >
4750 < span >
4851 { item . Publication . length > 0
49- ? < ul >
50- { Object . entries ( item [ 'Publication' ] ) . map ( ( [ key , value ] , index ) =>
51- < li key = { `publication-${ index } ` } className = "list-[circle] ml-8" >
52- < span className = "font-bold" > { `${ key } : ` } </ span >
53- < span > { value } </ span >
54- </ li >
55- ) }
56- </ ul >
57- : < span className = "text-ugray italic" > It will be updated soon.</ span >
52+ ? (
53+ < ul >
54+ { item . Publication . map ( ( id ) => {
55+ const pub = pubIndex . get ( id ) ;
56+ if ( ! pub ) return null ;
57+ return (
58+ < li key = { `publication-${ id } ` } className = "list-[circle] ml-8" >
59+ {
60+ pub . arxiv
61+ ? ( < a href = { pub . arxiv } target = "_blank" rel = "noreferrer" className = "italichover:text-blue-500" > { pub . title } </ a > )
62+ : ( < span > { pub . title } </ span > )
63+ }
64+ </ li >
65+ ) ;
66+ } ) }
67+ </ ul >
68+ )
69+ : ( < span className = "text-ugray italic" > It will be updated soon.</ span > )
5870 }
5971 </ span >
6072 </ li >
You can’t perform that action at this time.
0 commit comments