File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ import cookies from 'browser-cookies' ;
1
2
import moment from 'moment' ;
2
3
import PT from 'prop-types' ;
3
4
import React from 'react' ;
@@ -33,9 +34,10 @@ Link.propTypes = {
33
34
34
35
export default function TopcoderFooter ( ) {
35
36
const base = config . URL . BASE ;
36
- const auth = config . URL . AUTH ;
37
+ const authUrl = config . URL . AUTH ;
37
38
const retUrl = isomorphy . isClientSide ( ) ? encodeURIComponent ( window . location . href ) : '' ;
38
39
const currentYear = moment ( ) . year ( ) ;
40
+ const loggedIn = cookies . get ( 'tcjwt' ) !== null ;
39
41
return (
40
42
< div styleName = "footer" role = "contentinfo" >
41
43
< div styleName = "footer-wrap" >
@@ -92,7 +94,9 @@ export default function TopcoderFooter() {
92
94
< ul styleName = "navi-col-links" >
93
95
< Link to = { `${ base } /community/admins` } > Admins</ Link >
94
96
< Link to = { `${ base } /community/contact` } > Contact Us</ Link >
95
- < Link to = { `${ auth } ?utm_source=community&utm_campaign=tc-footer&utm_medium=promotion&retUrl=${ retUrl } ` } > Join Community</ Link >
97
+ { ! loggedIn
98
+ && < Link to = { `${ authUrl } ?utm_source=community&utm_campaign=tc-footer&utm_medium=promotion&retUrl=${ retUrl } ` } > Join Community</ Link >
99
+ }
96
100
< Link to = { `${ base } /community/learn` } > About Community</ Link >
97
101
< Link to = { `${ base } /community/changelog` } > Changelog</ Link >
98
102
< Link to = { `${ base } /contact-us/` } > Talk to Sales</ Link >
You can’t perform that action at this time.
0 commit comments