From 84f6b91ce5d4fac7e2fd9d13e2863701ad502b75 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 10 Apr 2020 16:20:05 -0500 Subject: [PATCH] Homepage pull dynamic content --- app/gabsocial/features/landing_page/index.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app/gabsocial/features/landing_page/index.js b/app/gabsocial/features/landing_page/index.js index 1223ede99..25ef2c15c 100644 --- a/app/gabsocial/features/landing_page/index.js +++ b/app/gabsocial/features/landing_page/index.js @@ -9,15 +9,23 @@ const mapStateToProps = (state, props) => ({ }); class LandingPage extends ImmutablePureComponent { + shouldComponentUpdate(nextProps, nextState) { + const { instance, soapbox } = nextProps; + return !instance.isEmpty() && !soapbox.isEmpty(); + } render() { + const { instance, soapbox } = this.props; + + if (instance.isEmpty() || soapbox.isEmpty()) return null; + return (