[Glitch] Fix Onboarding Errors
Port b8a2430642
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
shrike
parent
0b1556b7f7
commit
1cb8df655b
|
@ -7,7 +7,7 @@ import { fetchSuggestions } from 'flavours/glitch/actions/suggestions';
|
|||
import { markAsPartial } from 'flavours/glitch/actions/timelines';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import Account from 'flavours/glitch/containers/account_container';
|
||||
import EmptyAccount from 'flavours/glitch/components/account';
|
||||
import { EmptyAccount } from 'flavours/glitch/components/empty_account';
|
||||
import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
|
||||
import { makeGetAccount } from 'flavours/glitch/selectors';
|
||||
import { me } from 'flavours/glitch/initial_state';
|
||||
|
@ -31,6 +31,7 @@ class Follows extends React.PureComponent {
|
|||
suggestions: ImmutablePropTypes.list,
|
||||
account: ImmutablePropTypes.map,
|
||||
isLoading: PropTypes.bool,
|
||||
multiColumn: PropTypes.bool,
|
||||
};
|
||||
|
||||
componentDidMount () {
|
||||
|
@ -44,7 +45,7 @@ class Follows extends React.PureComponent {
|
|||
}
|
||||
|
||||
render () {
|
||||
const { onBack, isLoading, suggestions, account } = this.props;
|
||||
const { onBack, isLoading, suggestions, account, multiColumn } = this.props;
|
||||
|
||||
let loadedContent;
|
||||
|
||||
|
@ -58,7 +59,7 @@ class Follows extends React.PureComponent {
|
|||
|
||||
return (
|
||||
<Column>
|
||||
<ColumnBackButton onClick={onBack} />
|
||||
<ColumnBackButton multiColumn={multiColumn} onClick={onBack} />
|
||||
|
||||
<div className='scrollable privacy-policy'>
|
||||
<div className='column-title'>
|
||||
|
@ -84,4 +85,4 @@ class Follows extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(Follows);
|
||||
export default connect(mapStateToProps)(Follows);
|
||||
|
|
|
@ -46,6 +46,7 @@ class Onboarding extends ImmutablePureComponent {
|
|||
static propTypes = {
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
account: ImmutablePropTypes.map,
|
||||
multiColumn: PropTypes.bool,
|
||||
};
|
||||
|
||||
state = {
|
||||
|
@ -99,14 +100,14 @@ class Onboarding extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
render () {
|
||||
const { account } = this.props;
|
||||
const { account, multiColumn } = this.props;
|
||||
const { step, shareClicked } = this.state;
|
||||
|
||||
switch(step) {
|
||||
case 'follows':
|
||||
return <Follows onBack={this.handleBackClick} />;
|
||||
return <Follows onBack={this.handleBackClick} multiColumn={multiColumn} />;
|
||||
case 'share':
|
||||
return <Share onBack={this.handleBackClick} />;
|
||||
return <Share onBack={this.handleBackClick} multiColumn={multiColumn} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -140,17 +140,18 @@ class Share extends React.PureComponent {
|
|||
static propTypes = {
|
||||
onBack: PropTypes.func,
|
||||
account: ImmutablePropTypes.map,
|
||||
multiColumn: PropTypes.bool,
|
||||
intl: PropTypes.object,
|
||||
};
|
||||
|
||||
render () {
|
||||
const { onBack, account, intl } = this.props;
|
||||
const { onBack, account, multiColumn, intl } = this.props;
|
||||
|
||||
const url = (new URL(`/@${account.get('username')}`, document.baseURI)).href;
|
||||
|
||||
return (
|
||||
<Column>
|
||||
<ColumnBackButton onClick={onBack} />
|
||||
<ColumnBackButton multiColumn={multiColumn} onClick={onBack} />
|
||||
|
||||
<div className='scrollable privacy-policy'>
|
||||
<div className='column-title'>
|
||||
|
|
Loading…
Reference in New Issue