2020-08-17 21:07:16 +01:00
|
|
|
import React from 'react'
|
2020-08-17 21:59:29 +01:00
|
|
|
import PropTypes from 'prop-types'
|
2020-08-17 21:39:25 +01:00
|
|
|
import { connect } from 'react-redux'
|
2020-07-14 07:05:05 +01:00
|
|
|
import ReactSwipeableViews from 'react-swipeable-views'
|
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes'
|
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component'
|
2020-07-15 04:31:54 +01:00
|
|
|
import {
|
|
|
|
CX,
|
|
|
|
BREAKPOINT_EXTRA_SMALL,
|
|
|
|
GAB_COM_INTRODUCE_YOURSELF_GROUP_ID,
|
|
|
|
} from '../constants'
|
2020-07-14 07:05:05 +01:00
|
|
|
import { me } from '../initial_state'
|
2020-11-15 18:48:32 +00:00
|
|
|
import { saveShownOnboarding } from '../actions/settings'
|
2020-11-25 21:22:37 +00:00
|
|
|
import { fetchGroupsByTab } from '../actions/groups'
|
2020-07-15 04:31:54 +01:00
|
|
|
import { saveUserProfileInformation } from '../actions/user'
|
2020-07-14 07:05:05 +01:00
|
|
|
import { makeGetAccount } from '../selectors'
|
|
|
|
import Button from '../components/button'
|
|
|
|
import Divider from '../components/divider'
|
|
|
|
import FileInput from '../components/file_input'
|
|
|
|
import GroupListItem from '../components/group_list_item'
|
|
|
|
import Heading from '../components/heading'
|
|
|
|
import Icon from '../components/icon'
|
|
|
|
import Image from '../components/image'
|
|
|
|
import Input from '../components/input'
|
|
|
|
import Text from '../components/text'
|
2020-08-12 23:57:26 +01:00
|
|
|
import Pagination from '../components/pagination'
|
2020-07-14 07:05:05 +01:00
|
|
|
import ComposeFormContainer from './compose/containers/compose_form_container'
|
2020-07-15 04:31:54 +01:00
|
|
|
import Responsive from './ui/util/responsive_component'
|
2020-07-14 07:05:05 +01:00
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
const SlideWelcome = () => (
|
|
|
|
<div className={[_s.d, _s.w100PC, _s.h100PC].join(' ')}>
|
|
|
|
<Image src='/headers/onboarding.png' alt='Welcome to Gab' />
|
2019-08-07 06:02:36 +01:00
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
<div className={[_s.d, _s.px15, _s.py15].join(' ')}>
|
2020-07-15 04:31:54 +01:00
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
<Text size='large'>Gab is the home of free speech online and a place where users shape their own experience. </Text>
|
|
|
|
<br />
|
|
|
|
<Text size='large'>You will discover many different ideas, people, and topics on Gab.</Text>
|
|
|
|
<br />
|
|
|
|
<Text size='large'>Follow the people you find interesting and block or mute people you don't want to associate with.</Text>
|
|
|
|
<br />
|
|
|
|
<Text size='large'>Speak freely, associate freely!</Text>
|
|
|
|
<br />
|
|
|
|
<Text size='large'>Let's get started!</Text>
|
2020-07-14 07:05:05 +01:00
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
</div>
|
2020-07-14 07:05:05 +01:00
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
</div>
|
|
|
|
)
|
2020-07-14 07:05:05 +01:00
|
|
|
|
|
|
|
class SlidePhotos extends ImmutablePureComponent {
|
|
|
|
|
2020-07-15 04:31:54 +01:00
|
|
|
state = {
|
|
|
|
displayNameValue: this.props.account.get('display_name'),
|
|
|
|
}
|
|
|
|
|
|
|
|
handleCoverPhotoChange = (e) => {
|
|
|
|
try {
|
|
|
|
this.props.onSave({ header: e.target.files[0] })
|
|
|
|
} catch (error) {
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
handleProfilePhotoChange = (e) => {
|
|
|
|
try {
|
|
|
|
this.props.onSave({ avatar: e.target.files[0] })
|
|
|
|
} catch (error) {
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
handleDisplayNameChange = (value) => {
|
|
|
|
this.setState({ displayNameValue: value })
|
|
|
|
}
|
|
|
|
|
|
|
|
handleDisplayNameBlur = () => {
|
|
|
|
this.props.onSave({
|
|
|
|
displayName: this.state.displayNameValue,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-08-07 06:02:36 +01:00
|
|
|
render() {
|
2020-07-15 04:31:54 +01:00
|
|
|
const { displayNameValue } = this.state
|
2019-08-07 06:02:36 +01:00
|
|
|
|
|
|
|
return (
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.w100PC].join(' ')}>
|
|
|
|
<div className={[_s.d, _s.px15, _s.py15, _s.aiCenter].join(' ')}>
|
2020-07-14 07:05:05 +01:00
|
|
|
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.py10, _s.maxW640PX].join(' ')}>
|
2020-07-14 07:05:05 +01:00
|
|
|
<Text size='large' align='center'>Set your cover photo, profile photo and enter your display name so people can find you.</Text>
|
|
|
|
</div>
|
|
|
|
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.mt15, _s.w100PC, _s.aiCenter].join(' ')}>
|
|
|
|
<div className={[_s.d, _s.border1PX, _s.borderColorSecondary, _s.overflowHidden, _s.radiusSmall, _s.bgPrimary].join(' ')}>
|
2020-07-15 04:31:54 +01:00
|
|
|
<FileInput
|
|
|
|
width='300px'
|
|
|
|
height='140px'
|
|
|
|
id='cover-photo'
|
|
|
|
onChange={this.handleCoverPhotoChange}
|
2020-07-14 07:05:05 +01:00
|
|
|
/>
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.mtNeg32PX, _s.aiCenter, _s.jcCenter].join(' ')}>
|
2020-07-15 04:31:54 +01:00
|
|
|
<FileInput
|
|
|
|
width='124px'
|
|
|
|
height='124px'
|
|
|
|
id='profile-photo'
|
|
|
|
className={[_s.circle, _s.border6PX, _s.borderColorWhite, _s.bgPrimary].join(' ')}
|
|
|
|
onChange={this.handleProfilePhotoChange}
|
2020-07-14 07:05:05 +01:00
|
|
|
/>
|
|
|
|
</div>
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.py5, _s.px15, _s.mt5, _s.mb15].join(' ')}>
|
2020-07-14 07:05:05 +01:00
|
|
|
<Input
|
2020-07-15 04:31:54 +01:00
|
|
|
id='display-name'
|
|
|
|
title='Display name'
|
|
|
|
placeholder='Add your name...'
|
|
|
|
value={displayNameValue}
|
|
|
|
onChange={this.handleDisplayNameChange}
|
|
|
|
onBlur={this.handleDisplayNameBlur}
|
2020-07-14 07:05:05 +01:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-08-07 06:02:36 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-14 07:05:05 +01:00
|
|
|
)
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
2020-07-14 07:05:05 +01:00
|
|
|
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
SlidePhotos.propTypes = {
|
|
|
|
account: ImmutablePropTypes.map.isRequired,
|
|
|
|
}
|
2019-08-07 06:02:36 +01:00
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
class SlideGroups extends ImmutablePureComponent {
|
2019-08-07 06:02:36 +01:00
|
|
|
|
|
|
|
render() {
|
2020-07-14 07:05:05 +01:00
|
|
|
const { groupIds } = this.props
|
|
|
|
|
2019-08-07 06:02:36 +01:00
|
|
|
return (
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.w100PC].join(' ')}>
|
|
|
|
<div className={[_s.d, _s.py15, _s.aiCenter].join(' ')}>
|
|
|
|
<div className={[_s.d, _s.px15, _s.mb15].join(' ')}>
|
2020-07-14 07:05:05 +01:00
|
|
|
<Text size='large'>Gab Groups are a great way to connect with people who share your interests. Please select a few groups to get started.</Text>
|
2019-08-07 06:02:36 +01:00
|
|
|
</div>
|
|
|
|
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.w100PC].join(' ')}>
|
2020-07-14 07:05:05 +01:00
|
|
|
{
|
|
|
|
groupIds.map((groupId, i) => (
|
|
|
|
<GroupListItem
|
|
|
|
isAddable
|
2020-07-15 04:31:54 +01:00
|
|
|
isStatic
|
2020-07-14 07:05:05 +01:00
|
|
|
key={`group-collection-item-${i}`}
|
|
|
|
id={groupId}
|
|
|
|
isLast={groupIds.count() - 1 === i}
|
|
|
|
/>
|
|
|
|
))
|
|
|
|
}
|
|
|
|
</div>
|
2019-08-07 06:02:36 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2020-07-14 07:05:05 +01:00
|
|
|
}
|
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
SlideGroups.propTypes = {
|
|
|
|
groupIds: ImmutablePropTypes.list,
|
|
|
|
}
|
2020-07-14 07:05:05 +01:00
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
class SlideFirstPost extends React.PureComponent {
|
2019-08-07 06:02:36 +01:00
|
|
|
|
|
|
|
render() {
|
2020-07-15 04:31:54 +01:00
|
|
|
const { submitted } = this.props
|
|
|
|
|
2019-08-07 06:02:36 +01:00
|
|
|
return (
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.w100PC].join(' ')}>
|
|
|
|
<div className={[_s.d, _s.py15, _s.px15].join(' ')}>
|
2020-07-15 04:31:54 +01:00
|
|
|
{
|
|
|
|
!submitted &&
|
2020-08-17 21:07:16 +01:00
|
|
|
<React.Fragment>
|
2020-07-15 04:31:54 +01:00
|
|
|
<Text size='large' className={_s.pb10}>Now let's make your very first Gab post! Please introduce yourself to the Gab community. How did you hear about Gab? What are you interested in?</Text>
|
|
|
|
<br />
|
|
|
|
|
|
|
|
<Divider />
|
|
|
|
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.mt15, _s.boxShadowBlock, _s.radiusSmall].join(' ')}>
|
2020-07-15 04:31:54 +01:00
|
|
|
<ComposeFormContainer
|
|
|
|
groupId={GAB_COM_INTRODUCE_YOURSELF_GROUP_ID}
|
|
|
|
hidePro
|
|
|
|
autoFocus
|
|
|
|
autoJoinGroup
|
|
|
|
/>
|
|
|
|
</div>
|
2020-08-17 21:07:16 +01:00
|
|
|
</React.Fragment>
|
2020-07-15 04:31:54 +01:00
|
|
|
}
|
|
|
|
{
|
|
|
|
submitted &&
|
2020-08-17 21:07:16 +01:00
|
|
|
<React.Fragment>
|
2020-07-15 04:31:54 +01:00
|
|
|
<Text size='large' align='center'>Your gab was posted!</Text>
|
|
|
|
<br />
|
2020-07-15 05:01:06 +01:00
|
|
|
<Text size='large' align='center'>Welcome to our community, remember to speak freely.</Text>
|
2020-07-15 04:31:54 +01:00
|
|
|
<br />
|
|
|
|
<Button
|
|
|
|
href='/home'
|
|
|
|
onClick={this.props.onNext}
|
|
|
|
>
|
|
|
|
Finish
|
|
|
|
</Button>
|
2020-08-17 21:07:16 +01:00
|
|
|
</React.Fragment>
|
2020-07-15 04:31:54 +01:00
|
|
|
}
|
2019-08-07 06:02:36 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-14 07:05:05 +01:00
|
|
|
)
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
2020-07-14 07:05:05 +01:00
|
|
|
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
SlideFirstPost.propTypes = {
|
|
|
|
submitted: PropTypes.bool.isRequired,
|
|
|
|
onNext: PropTypes.func.isRequired,
|
|
|
|
}
|
2020-07-14 07:05:05 +01:00
|
|
|
|
|
|
|
class Introduction extends ImmutablePureComponent {
|
2019-08-07 06:02:36 +01:00
|
|
|
|
|
|
|
state = {
|
|
|
|
currentIndex: 0,
|
2020-07-15 04:31:54 +01:00
|
|
|
submittedFirstPost: false,
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
componentDidMount() {
|
2020-07-15 04:31:54 +01:00
|
|
|
window.addEventListener('keyup', this.handleKeyUp)
|
|
|
|
this.props.onFetchFeaturedGroups()
|
|
|
|
this.props.onSaveShownOnboarding()
|
|
|
|
}
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
if (!this.state.submittedFirstPost && !prevProps.isSubmitting && this.props.isSubmitting) {
|
|
|
|
this.setState({ submittedFirstPost: true })
|
2020-07-14 07:05:05 +01:00
|
|
|
}
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
componentWillUnmount() {
|
2020-07-14 07:05:05 +01:00
|
|
|
window.addEventListener('keyup', this.handleKeyUp)
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
2020-08-12 23:57:26 +01:00
|
|
|
handleDot = (i) => {
|
2020-07-14 07:05:05 +01:00
|
|
|
this.setState({ currentIndex: i })
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
handlePrev = () => {
|
|
|
|
this.setState(({ currentIndex }) => ({
|
|
|
|
currentIndex: Math.max(0, currentIndex - 1),
|
2020-07-14 07:05:05 +01:00
|
|
|
}))
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
handleNext = () => {
|
2020-07-14 07:05:05 +01:00
|
|
|
const newIndex = Math.min(this.state.currentIndex + 1, 3)
|
|
|
|
this.setState({
|
|
|
|
currentIndex: newIndex,
|
|
|
|
})
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
handleSwipe = (index) => {
|
2020-07-14 07:05:05 +01:00
|
|
|
this.setState({ currentIndex: index })
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
handleKeyUp = ({ key }) => {
|
|
|
|
switch (key) {
|
2020-07-14 07:05:05 +01:00
|
|
|
case 'ArrowLeft':
|
|
|
|
this.handlePrev()
|
|
|
|
break
|
|
|
|
case 'ArrowRight':
|
|
|
|
this.handleNext()
|
|
|
|
break
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-15 04:31:54 +01:00
|
|
|
handleOnSaveUserProfileInformation = (data) => {
|
|
|
|
this.props.onSaveUserProfileInformation(data)
|
|
|
|
}
|
|
|
|
|
2020-07-14 07:05:05 +01:00
|
|
|
render() {
|
|
|
|
const { account, groupIds } = this.props
|
2020-07-15 04:31:54 +01:00
|
|
|
const { currentIndex, submittedFirstPost } = this.state
|
2020-07-14 07:05:05 +01:00
|
|
|
|
|
|
|
const pages = [
|
|
|
|
<SlideWelcome />,
|
2020-07-15 04:31:54 +01:00
|
|
|
<SlidePhotos
|
|
|
|
account={account}
|
|
|
|
onSave={this.handleOnSaveUserProfileInformation}
|
|
|
|
/>,
|
2020-07-14 07:05:05 +01:00
|
|
|
<SlideGroups groupIds={groupIds} />,
|
2020-07-15 04:31:54 +01:00
|
|
|
<SlideFirstPost
|
|
|
|
submitted={submittedFirstPost}
|
|
|
|
onNext={this.handleNext}
|
|
|
|
/>,
|
2020-07-14 07:05:05 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
const titles = [
|
|
|
|
`Welcome to Gab!`,
|
|
|
|
'Complete your profile',
|
|
|
|
'Find your people',
|
|
|
|
'Start a conversation',
|
|
|
|
]
|
|
|
|
const title = titles[currentIndex]
|
|
|
|
|
2020-07-15 05:20:26 +01:00
|
|
|
const nextTitle = currentIndex === 3 ? 'Finish' : 'Next'
|
|
|
|
|
2019-08-07 06:02:36 +01:00
|
|
|
return (
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.w100PC, _s.maxH80VH].join(' ')}>
|
|
|
|
<div className={[_s.d, _s.flexRow, _s.aiCenter, _s.jcCenter, _s.borderBottom1PX, _s.borderColorSecondary, _s.h53PX, _s.px15].join(' ')}>
|
2020-07-15 04:31:54 +01:00
|
|
|
<Responsive min={BREAKPOINT_EXTRA_SMALL}>
|
|
|
|
<Heading>
|
|
|
|
{title}
|
|
|
|
</Heading>
|
|
|
|
</Responsive>
|
|
|
|
<Responsive max={BREAKPOINT_EXTRA_SMALL}>
|
|
|
|
<Heading size='h2'>
|
|
|
|
{title}
|
|
|
|
</Heading>
|
|
|
|
</Responsive>
|
2020-07-14 07:05:05 +01:00
|
|
|
<div className={[_s.mlAuto].join(' ')}>
|
|
|
|
<Button
|
2020-07-15 04:31:54 +01:00
|
|
|
href={currentIndex === 3 ? '/home' : undefined}
|
2020-07-14 07:05:05 +01:00
|
|
|
onClick={this.handleNext}
|
2020-07-15 04:31:54 +01:00
|
|
|
className={_s.px10}
|
2020-07-14 07:05:05 +01:00
|
|
|
icon={currentIndex !== 3 ? 'arrow-right' : undefined}
|
|
|
|
iconSize={currentIndex !== 3 ? '18px' : undefined}
|
2020-07-15 04:31:54 +01:00
|
|
|
>
|
2020-07-14 07:05:05 +01:00
|
|
|
{
|
|
|
|
currentIndex === 3 &&
|
2020-08-17 21:07:16 +01:00
|
|
|
<React.Fragment>
|
2020-07-15 04:31:54 +01:00
|
|
|
<Responsive min={BREAKPOINT_EXTRA_SMALL}>
|
2020-07-15 05:20:26 +01:00
|
|
|
<Text color='white' className={_s.px5}>{nextTitle}</Text>
|
2020-07-15 04:31:54 +01:00
|
|
|
</Responsive>
|
|
|
|
<Responsive max={BREAKPOINT_EXTRA_SMALL}>
|
2020-12-09 04:15:33 +00:00
|
|
|
<Text color='white' className={[_s.px5, _s.mr10].join(' ')}>Done</Text>
|
2020-08-18 21:43:06 +01:00
|
|
|
<Icon id='check' size='14px' className={_s.cWhite} />
|
2020-07-15 04:31:54 +01:00
|
|
|
</Responsive>
|
2020-08-17 21:07:16 +01:00
|
|
|
</React.Fragment>
|
2020-07-14 07:05:05 +01:00
|
|
|
}
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<ReactSwipeableViews
|
|
|
|
index={currentIndex}
|
|
|
|
onChangeIndex={this.handleSwipe}
|
2020-08-18 21:49:11 +01:00
|
|
|
className={[_s.d, _s.flexNormal, _s.calcH80VH106PX].join(' ')}
|
2020-07-14 07:05:05 +01:00
|
|
|
containerStyle={{
|
|
|
|
width: '100%',
|
|
|
|
}}
|
|
|
|
slideStyle={{
|
|
|
|
// height: '100%',
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{
|
|
|
|
pages.map((page, i) => (
|
2020-08-18 21:49:11 +01:00
|
|
|
<div key={i} className={[_s.d, _s.calcH80VH106PX].join(' ')}>
|
2020-07-14 07:05:05 +01:00
|
|
|
{page}
|
|
|
|
</div>
|
|
|
|
))
|
|
|
|
}
|
2019-08-07 06:02:36 +01:00
|
|
|
</ReactSwipeableViews>
|
|
|
|
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.px15, _s.h53PX, _s.aiCenter, _s.jcCenter, _s.borderTop1PX, _s.borderColorSecondary, _s.w100PC, _s.flexRow].join(' ')}>
|
|
|
|
<div className={[_s.d, _s.w50PX, _s.mrAuto].join(' ')}>
|
2020-07-14 07:05:05 +01:00
|
|
|
{
|
|
|
|
currentIndex !== 0 &&
|
|
|
|
<Button
|
|
|
|
className={_s.opacity05}
|
|
|
|
onClick={this.handlePrev}
|
|
|
|
icon='arrow-left'
|
|
|
|
backgroundColor='none'
|
|
|
|
color='secondary'
|
|
|
|
iconSize='20px'
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
</div>
|
2020-08-12 23:57:26 +01:00
|
|
|
|
2020-08-18 21:49:11 +01:00
|
|
|
<div className={[_s.d, _s.h100PC, _s.flexGrow1, _s.aiCenter, _s.jcCenter].join(' ')}>
|
2020-08-12 23:57:26 +01:00
|
|
|
<Pagination
|
|
|
|
count={pages.length}
|
|
|
|
activeIndex={currentIndex}
|
|
|
|
onClick={this.handleDot}
|
|
|
|
color='brand'
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
2020-07-14 07:05:05 +01:00
|
|
|
<Button
|
2020-07-15 05:20:26 +01:00
|
|
|
isText
|
2020-07-15 04:31:54 +01:00
|
|
|
href={currentIndex === 3 ? '/home' : undefined}
|
2020-08-18 21:49:11 +01:00
|
|
|
className={[_s.d, _s.w50PX, _s.h100PC, _s.jcCenter, _s.pr0, _s.pl0, _s.mlAuto, _s.opacity05].join(' ')}
|
2020-07-14 07:05:05 +01:00
|
|
|
onClick={this.handleNext}
|
|
|
|
backgroundColor='none'
|
|
|
|
color='secondary'
|
2020-07-15 05:20:26 +01:00
|
|
|
>
|
|
|
|
<Text color='inherit' align='right'>{nextTitle}</Text>
|
|
|
|
</Button>
|
2019-08-07 06:02:36 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-14 07:05:05 +01:00
|
|
|
)
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|
|
|
|
|
2020-08-19 01:22:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => ({
|
|
|
|
account: makeGetAccount()(state, me),
|
|
|
|
groupIds: state.getIn(['group_lists', 'featured', 'items']),
|
|
|
|
shownOnboarding: state.getIn(['settings', 'shownOnboarding'], false),
|
|
|
|
isSubmitting: state.getIn(['compose', 'is_submitting']),
|
|
|
|
})
|
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch) => ({
|
|
|
|
onSaveShownOnboarding: () => dispatch(saveShownOnboarding()),
|
2020-11-25 21:22:37 +00:00
|
|
|
onFetchFeaturedGroups: () => dispatch(fetchGroupsByTab('featured')),
|
2020-08-19 01:22:15 +01:00
|
|
|
onSaveUserProfileInformation(data) {
|
|
|
|
dispatch(saveUserProfileInformation(data))
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
Introduction.propTypes = {
|
|
|
|
account: ImmutablePropTypes.map.isRequired,
|
|
|
|
groupIds: ImmutablePropTypes.list,
|
|
|
|
isSubmitting: PropTypes.bool.isRequired,
|
|
|
|
shownOnboarding: PropTypes.bool.isRequired,
|
|
|
|
onSaveShownOnboarding: PropTypes.func.isRequired,
|
|
|
|
onFetchFeaturedGroups: PropTypes.func.isRequired,
|
|
|
|
onSaveUserProfileInformation: PropTypes.func.isRequired,
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Introduction)
|