@@ -15,45 +15,39 @@ See the License for the specific language governing permissions and
1515limitations under the License.
1616*/
1717
18- 'use strict' ;
19-
20- const React = require ( 'react' ) ;
18+ import React from 'react' ;
2119import SdkConfig from 'matrix-react-sdk/lib/SdkConfig' ;
2220
2321import { _t } from 'matrix-react-sdk/lib/languageHandler' ;
2422
25- module . exports = React . createClass ( {
26- displayName : 'VectorAuthFooter' ,
27- statics : {
28- replaces : 'AuthFooter' ,
29- } ,
30-
31- render : function ( ) {
32- const brandingConfig = SdkConfig . get ( ) . branding ;
33- let links = [
34- { "text" : "blog" , "url" : "https://medium.com/@RiotChat" } ,
35- { "text" : "twitter" , "url" : "https://twitter.com/@RiotChat" } ,
36- { "text" : "github" , "url" : "https://github.com/vector-im/riot-web" } ,
37- ] ;
38-
39- if ( brandingConfig && brandingConfig . authFooterLinks ) {
40- links = brandingConfig . authFooterLinks ;
41- }
42-
43- const authFooterLinks = [ ] ;
44- for ( const linkEntry of links ) {
45- authFooterLinks . push (
46- < a href = { linkEntry . url } key = { linkEntry . text } target = "_blank" rel = "noopener" >
47- { linkEntry . text }
48- </ a > ,
49- ) ;
50- }
51-
52- return (
53- < div className = "mx_AuthFooter" >
54- { authFooterLinks }
55- < a href = "https://matrix.org" target = "_blank" rel = "noopener" > { _t ( 'powered by Matrix' ) } </ a >
56- </ 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 > ,
5741 ) ;
58- } ,
59- } ) ;
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