@@ -16,43 +16,38 @@ limitations under the License.
1616*/
1717
1818import React from 'react' ;
19- import createReactClass from 'create-react-class' ;
2019import SdkConfig from 'matrix-react-sdk/lib/SdkConfig' ;
2120
2221import { _t } from 'matrix-react-sdk/lib/languageHandler' ;
2322
24- module . exports = createReactClass ( {
25- displayName : 'VectorAuthFooter' ,
26- statics : {
27- replaces : 'AuthFooter' ,
28- } ,
29-
30- render : function ( ) {
31- const brandingConfig = SdkConfig . get ( ) . branding ;
32- let links = [
33- { "text" : "blog" , "url" : "https://medium.com/@RiotChat" } ,
34- { "text" : "twitter" , "url" : "https://twitter.com/@RiotChat" } ,
35- { "text" : "github" , "url" : "https://github.com/vector-im/riot-web" } ,
36- ] ;
37-
38- if ( brandingConfig && brandingConfig . authFooterLinks ) {
39- links = brandingConfig . authFooterLinks ;
40- }
41-
42- const authFooterLinks = [ ] ;
43- for ( const linkEntry of links ) {
44- authFooterLinks . push (
45- < a href = { linkEntry . url } key = { linkEntry . text } target = "_blank" rel = "noopener" >
46- { linkEntry . text }
47- </ a > ,
48- ) ;
49- }
50-
51- return (
52- < div className = "mx_AuthFooter" >
53- { authFooterLinks }
54- < a href = "https://matrix.org" target = "_blank" rel = "noopener" > { _t ( 'powered by Matrix' ) } </ a >
55- </ div >
23+ module . exports = ( ) => {
24+ const brandingConfig = SdkConfig . get ( ) . branding ;
25+ let links = [
26+ { "text" : "blog" , "url" : "https://medium.com/@RiotChat" } ,
27+ { "text" : "twitter" , "url" : "https://twitter.com/@RiotChat" } ,
28+ { "text" : "github" , "url" : "https://github.com/vector-im/riot-web" } ,
29+ ] ;
30+
31+ if ( brandingConfig && brandingConfig . authFooterLinks ) {
32+ links = brandingConfig . authFooterLinks ;
33+ }
34+
35+ const authFooterLinks = [ ] ;
36+ for ( const linkEntry of links ) {
37+ authFooterLinks . push (
38+ < a href = { linkEntry . url } key = { linkEntry . text } target = "_blank" rel = "noopener" >
39+ { linkEntry . text }
40+ </ a > ,
5641 ) ;
57- } ,
58- } ) ;
42+ }
43+
44+ return (
45+ < div className = "mx_AuthFooter" >
46+ { authFooterLinks }
47+ < a href = "https://matrix.org" target = "_blank" rel = "noopener" > { _t ( 'powered by Matrix' ) } </ a >
48+ </ div >
49+ ) ;
50+ } ;
51+ module . exports . statics = {
52+ replaces : 'AuthFooter' ,
53+ } ;
0 commit comments