From 81ef21a0c802f1d905f37a2a818544a8b400793c Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Sat, 25 Feb 2023 14:34:32 +0100 Subject: [Glitch] Rename JSX files with proper `.jsx` extension Port 44a7d87cb1f5df953b6c14c16c59e2e4ead1bcb9 to glitch-soc Signed-off-by: Claire --- .../glitch/features/ui/components/header.js | 88 ---------------------- 1 file changed, 88 deletions(-) delete mode 100644 app/javascript/flavours/glitch/features/ui/components/header.js (limited to 'app/javascript/flavours/glitch/features/ui/components/header.js') diff --git a/app/javascript/flavours/glitch/features/ui/components/header.js b/app/javascript/flavours/glitch/features/ui/components/header.js deleted file mode 100644 index d9ad94961..000000000 --- a/app/javascript/flavours/glitch/features/ui/components/header.js +++ /dev/null @@ -1,88 +0,0 @@ -import React from 'react'; -import Logo from 'flavours/glitch/components/logo'; -import { Link, withRouter } from 'react-router-dom'; -import { FormattedMessage } from 'react-intl'; -import { registrationsOpen, me } from 'flavours/glitch/initial_state'; -import Avatar from 'flavours/glitch/components/avatar'; -import Permalink from 'flavours/glitch/components/permalink'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; -import { openModal } from 'flavours/glitch/actions/modal'; - -const Account = connect(state => ({ - account: state.getIn(['accounts', me]), -}))(({ account }) => ( - - - -)); - -const mapDispatchToProps = (dispatch) => ({ - openClosedRegistrationsModal() { - dispatch(openModal('CLOSED_REGISTRATIONS')); - }, -}); - -export default @connect(null, mapDispatchToProps) -@withRouter -class Header extends React.PureComponent { - - static contextTypes = { - identity: PropTypes.object, - }; - - static propTypes = { - openClosedRegistrationsModal: PropTypes.func, - location: PropTypes.object, - }; - - render () { - const { signedIn } = this.context.identity; - const { location, openClosedRegistrationsModal } = this.props; - - let content; - - if (signedIn) { - content = ( - <> - {location.pathname !== '/publish' && } - - - ); - } else { - let signupButton; - - if (registrationsOpen) { - signupButton = ( - - - - ); - } else { - signupButton = ( - - ); - } - - content = ( - <> - - {signupButton} - - ); - } - - return ( -
- - -
- {content} -
-
- ); - } - -} -- cgit