diff --git a/app/gabsocial/features/landing_page/index.js b/app/gabsocial/features/landing_page/index.js index b8a5c4b44..d437233fc 100644 --- a/app/gabsocial/features/landing_page/index.js +++ b/app/gabsocial/features/landing_page/index.js @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { Link } from 'react-router-dom'; import RegistrationForm from './components/registration_form'; -import SiteLogo from '../public_layout/components/site_logo'; +import SiteBanner from '../public_layout/components/site_banner'; const mapStateToProps = (state, props) => ({ instance: state.get('instance'), @@ -20,7 +20,7 @@ class LandingPage extends ImmutablePureComponent {
- +
{instance.get('description')} diff --git a/app/gabsocial/features/public_layout/components/site_banner.js b/app/gabsocial/features/public_layout/components/site_banner.js new file mode 100644 index 000000000..eb17c7980 --- /dev/null +++ b/app/gabsocial/features/public_layout/components/site_banner.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import ImmutablePureComponent from 'react-immutable-pure-component'; + +const mapStateToProps = (state, props) => ({ + instance: state.get('instance'), + soapbox: state.get('soapbox'), +}); + +class SiteBanner extends ImmutablePureComponent { + + render() { + const { instance, soapbox } = this.props; + const logos = { + imgLogo: ({instance.get('title')}), + textLogo: (

{instance.get('title')}

), + }; + return soapbox.has('banner') ? logos.imgLogo : logos.textLogo; + } + +} + +export default connect(mapStateToProps)(SiteBanner); diff --git a/app/gabsocial/features/public_layout/components/site_logo.js b/app/gabsocial/features/public_layout/components/site_logo.js index 2cc43a0a6..a19ab5074 100644 --- a/app/gabsocial/features/public_layout/components/site_logo.js +++ b/app/gabsocial/features/public_layout/components/site_logo.js @@ -15,7 +15,7 @@ class SiteLogo extends ImmutablePureComponent { imgLogo: ({instance.get('title')}), textLogo: (

{instance.get('title')}

), }; - return soapbox.get('logo') ? logos.imgLogo : logos.textLogo; + return soapbox.has('logo') ? logos.imgLogo : logos.textLogo; } }