mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-27 10:30:15 -05:00
[Glitch] Use the new JSX transform in onboarding code
Port the remaining of 8f66126b10
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
6e4497ab2d
commit
ba4c8a9b41
@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Check } from 'flavours/glitch/components/check';
|
import { Check } from 'flavours/glitch/components/check';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
@ -6,13 +6,13 @@ import classNames from 'classnames';
|
|||||||
const ProgressIndicator = ({ steps, completed }) => (
|
const ProgressIndicator = ({ steps, completed }) => (
|
||||||
<div className='onboarding__progress-indicator'>
|
<div className='onboarding__progress-indicator'>
|
||||||
{(new Array(steps)).fill().map((_, i) => (
|
{(new Array(steps)).fill().map((_, i) => (
|
||||||
<React.Fragment key={i}>
|
<Fragment key={i}>
|
||||||
{i > 0 && <div className={classNames('onboarding__progress-indicator__line', { active: completed > i })} />}
|
{i > 0 && <div className={classNames('onboarding__progress-indicator__line', { active: completed > i })} />}
|
||||||
|
|
||||||
<div className={classNames('onboarding__progress-indicator__step', { active: completed > i })}>
|
<div className={classNames('onboarding__progress-indicator__step', { active: completed > i })}>
|
||||||
{completed > i && <Check />}
|
{completed > i && <Check />}
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import { PureComponent } from 'react';
|
||||||
import Column from 'flavours/glitch/components/column';
|
import Column from 'flavours/glitch/components/column';
|
||||||
import ColumnBackButton from 'flavours/glitch/components/column_back_button';
|
import ColumnBackButton from 'flavours/glitch/components/column_back_button';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
@ -23,7 +23,7 @@ const mapStateToProps = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
class Follows extends React.PureComponent {
|
class Follows extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onBack: PropTypes.func,
|
onBack: PropTypes.func,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import { PureComponent } from 'react';
|
||||||
import Column from 'flavours/glitch/components/column';
|
import Column from 'flavours/glitch/components/column';
|
||||||
import ColumnBackButton from 'flavours/glitch/components/column_back_button';
|
import ColumnBackButton from 'flavours/glitch/components/column_back_button';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
@ -20,7 +20,7 @@ const mapStateToProps = state => ({
|
|||||||
account: state.getIn(['accounts', me]),
|
account: state.getIn(['accounts', me]),
|
||||||
});
|
});
|
||||||
|
|
||||||
class CopyPasteText extends React.PureComponent {
|
class CopyPasteText extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
value: PropTypes.string,
|
value: PropTypes.string,
|
||||||
@ -81,7 +81,7 @@ class CopyPasteText extends React.PureComponent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class TipCarousel extends React.PureComponent {
|
class TipCarousel extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
@ -135,7 +135,7 @@ class TipCarousel extends React.PureComponent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Share extends React.PureComponent {
|
class Share extends PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onBack: PropTypes.func,
|
onBack: PropTypes.func,
|
||||||
|
Loading…
Reference in New Issue
Block a user