@@ -20,19 +20,26 @@ class Sidebar extends Component {
2020 this . setState ( { collapsed : ! this . state . collapsed } ) ;
2121 }
2222
23- link ( text , url ) {
23+ link ( text , url , version ) {
2424 return (
2525 < div >
2626 < a href = { url } target = "_blank" rel = "noopener noreferrer" >
2727 < LinkIcon className = "small-icon" />
2828 { text }
2929 </ a >
30+ { version && < span className = "version" > { version } </ span > }
3031 </ div >
3132 ) ;
3233 }
3334
3435 render ( ) {
35- const { schema, onTableClick, onExampleClick, exampleQueries } = this . props ;
36+ const {
37+ schema,
38+ version,
39+ onTableClick,
40+ onExampleClick,
41+ exampleQueries
42+ } = this . props ;
3643 const { collapsed } = this . state ;
3744
3845 return (
@@ -57,7 +64,21 @@ class Sidebar extends Component {
5764 </ div >
5865 < div className = "footer list" >
5966 { this . link ( 'go-git' , 'https://github.com/src-d/go-git' ) }
60- { this . link ( 'babelfish' , 'https://doc.bblf.sh' ) }
67+ { this . link (
68+ 'babelfish' ,
69+ 'https://doc.bblf.sh' ,
70+ version ? version . bblfsh : ''
71+ ) }
72+ { this . link (
73+ 'gitbase' ,
74+ 'https://docs.sourced.tech/gitbase' ,
75+ version ? version . gitbase : ''
76+ ) }
77+ { this . link (
78+ 'gitbase-web' ,
79+ 'https://github.com/src-d/gitbase-web' ,
80+ version ? version . version : ''
81+ ) }
6182 { this . link ( 'source{d} © 2018' , 'https://sourced.tech' ) }
6283 </ div >
6384 </ div >
@@ -67,6 +88,11 @@ class Sidebar extends Component {
6788
6889Sidebar . propTypes = {
6990 schema : Schema . propTypes . schema ,
91+ version : PropTypes . shape ( {
92+ version : PropTypes . string . isRequired ,
93+ bblfsh : PropTypes . string . isRequired ,
94+ gitbase : PropTypes . string . isRequired
95+ } ) ,
7096 onTableClick : PropTypes . func ,
7197 onExampleClick : PropTypes . func ,
7298 exampleQueries : SampleQueries . propTypes . exampleQueries
0 commit comments