Merge remote-tracking branch 'origin/develop' into federation-restrictions-improvements

merge-requests/643/head
Alex Gleason 3 years ago
commit 3fbb1dd164
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -5,13 +5,16 @@ import WhoToFollowPanel from 'soapbox/features/ui/components/who_to_follow_panel
import TrendsPanel from 'soapbox/features/ui/components/trends_panel';
import PromoPanel from 'soapbox/features/ui/components/promo_panel';
import FeaturesPanel from 'soapbox/features/ui/components/features_panel';
import SignUpPanel from 'soapbox/features/ui/components/sign_up_panel';
import LinkFooter from 'soapbox/features/ui/components/link_footer';
import { getFeatures } from 'soapbox/utils/features';
const mapStateToProps = state => {
const me = state.get('me');
const features = getFeatures(state.get('instance'));
return {
me,
showTrendsPanel: features.trends,
showWhoToFollowPanel: features.suggestions,
};
@ -21,7 +24,7 @@ export default @connect(mapStateToProps)
class DefaultPage extends ImmutablePureComponent {
render() {
const { children, showTrendsPanel, showWhoToFollowPanel } = this.props;
const { me, children, showTrendsPanel, showWhoToFollowPanel } = this.props;
return (
<div className='page'>
@ -42,7 +45,7 @@ class DefaultPage extends ImmutablePureComponent {
<div className='columns-area__panels__pane__inner'>
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
<FeaturesPanel key='features-panel' />
{me ? <FeaturesPanel key='features-panel' /> : <SignUpPanel key='sign-up-panel' />}
<PromoPanel key='promo-panel' />
<LinkFooter key='link-footer' />
</div>

@ -11,6 +11,7 @@ import FundingPanel from 'soapbox/features/ui/components/funding_panel';
import CryptoDonatePanel from 'soapbox/features/crypto_donate/components/crypto_donate_panel';
// import GroupSidebarPanel from '../features/groups/sidebar_panel';
import FeaturesPanel from 'soapbox/features/ui/components/features_panel';
import SignUpPanel from 'soapbox/features/ui/components/sign_up_panel';
import LinkFooter from 'soapbox/features/ui/components/link_footer';
import { getSoapboxConfig } from 'soapbox/actions/soapbox';
import { getFeatures } from 'soapbox/utils/features';
@ -79,7 +80,7 @@ class HomePage extends ImmutablePureComponent {
<div className='columns-area__panels__pane__inner'>
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
<FeaturesPanel key='features-panel' />
{me ? <FeaturesPanel key='features-panel' /> : <SignUpPanel key='sign-up-panel' />}
<PromoPanel key='promo-panel' />
<LinkFooter key='link-footer' />
</div>

@ -11,9 +11,11 @@ import InstanceInfoPanel from 'soapbox/features/ui/components/instance_info_pane
import { federationRestrictionsDisclosed } from 'soapbox/utils/state';
const mapStateToProps = state => {
const me = state.get('me');
const features = getFeatures(state.get('instance'));
return {
me,
showTrendsPanel: features.trends,
showWhoToFollowPanel: features.suggestions,
disclosed: federationRestrictionsDisclosed(state),
@ -24,7 +26,7 @@ export default @connect(mapStateToProps)
class RemoteInstancePage extends ImmutablePureComponent {
render() {
const { children, showTrendsPanel, showWhoToFollowPanel, params: { instance: host }, disclosed } = this.props;
const { me, children, showTrendsPanel, showWhoToFollowPanel, params: { instance: host }, disclosed } = this.props;
return (
<div className='page'>
@ -47,7 +49,7 @@ class RemoteInstancePage extends ImmutablePureComponent {
<div className='columns-area__panels__pane__inner'>
{showTrendsPanel && <TrendsPanel limit={3} key='trends-panel' />}
{showWhoToFollowPanel && <WhoToFollowPanel limit={5} key='wtf-panel' />}
<FeaturesPanel key='features-panel' />
{me && <FeaturesPanel key='features-panel' />}
<PromoPanel key='promo-panel' />
<LinkFooter key='link-footer' />
</div>

Loading…
Cancel
Save