From 82edcc4bd8f68a770a5c23ccf83d199c8e9515be Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 10 Sep 2022 12:04:08 -0500 Subject: [PATCH] Delete unused "introduction" feature --- app/soapbox/features/introduction/index.js | 172 --------------------- 1 file changed, 172 deletions(-) delete mode 100644 app/soapbox/features/introduction/index.js diff --git a/app/soapbox/features/introduction/index.js b/app/soapbox/features/introduction/index.js deleted file mode 100644 index a35ba341a..000000000 --- a/app/soapbox/features/introduction/index.js +++ /dev/null @@ -1,172 +0,0 @@ -import classNames from 'clsx'; -import PropTypes from 'prop-types'; -import React from 'react'; -import { FormattedMessage } from 'react-intl'; -import { connect } from 'react-redux'; -import ReactSwipeableViews from 'react-swipeable-views'; - -import { closeOnboarding } from '../../actions/onboarding'; - -const FrameWelcome = ({ domain, onNext }) => ( -
-
-

-

{domain} }} />

-
- -
- -
-
-); - -FrameWelcome.propTypes = { - domain: PropTypes.string.isRequired, - onNext: PropTypes.func.isRequired, -}; - -const FrameFederation = ({ onNext }) => ( -
-
-
-

-

-
-
- -
- -
-
-); - -FrameFederation.propTypes = { - onNext: PropTypes.func.isRequired, -}; - -const FrameInteractions = ({ onNext }) => ( -
-
-
-

-

-
- -
-

-

-
- -
-

-

-
-
- -
- -
-
-); - -FrameInteractions.propTypes = { - onNext: PropTypes.func.isRequired, -}; - -export default @connect(state => ({ domain: state.getIn(['meta', 'domain']) })) -class Introduction extends React.PureComponent { - - static propTypes = { - domain: PropTypes.string.isRequired, - dispatch: PropTypes.func.isRequired, - }; - - state = { - currentIndex: 0, - }; - - constructor(props) { - super(props); - this.pages = [ - , - , - , - ]; - } - - componentDidMount() { - window.addEventListener('keyup', this.handleKeyUp); - } - - componentWillUnmount() { - window.addEventListener('keyup', this.handleKeyUp); - } - - handleDot = (e) => { - const i = Number(e.currentTarget.getAttribute('data-index')); - e.preventDefault(); - this.setState({ currentIndex: i }); - } - - handlePrev = () => { - this.setState(({ currentIndex }) => ({ - currentIndex: Math.max(0, currentIndex - 1), - })); - } - - handleNext = () => { - const { pages } = this; - - this.setState(({ currentIndex }) => ({ - currentIndex: Math.min(currentIndex + 1, pages.length - 1), - })); - } - - handleSwipe = (index) => { - this.setState({ currentIndex: index }); - } - - handleFinish = () => { - this.props.dispatch(closeOnboarding()); - } - - handleKeyUp = ({ key }) => { - switch (key) { - case 'ArrowLeft': - this.handlePrev(); - break; - case 'ArrowRight': - this.handleNext(); - break; - } - } - - render() { - const { currentIndex } = this.state; - const { pages } = this; - - return ( -
- - {pages.map((page, i) => ( -
{page}
- ))} -
- -
- {pages.map((_, i) => ( -
- ))} -
-
- ); - } - -}