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