remove extra step
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import {AppBskyActorDefs} from '@atproto/api'
|
||||
|
||||
const steps = ['Landing', 'Details', 'Profiles', 'Feeds'] as const
|
||||
const steps = ['Details', 'Profiles', 'Feeds'] as const
|
||||
type Step = (typeof steps)[number]
|
||||
|
||||
type Action =
|
||||
@@ -42,7 +42,7 @@ function reducer(state: State, action: Action): State {
|
||||
if (action.type === 'Next' && state.currentStep !== 'Feeds') {
|
||||
const currentIndex = steps.indexOf(state.currentStep)
|
||||
updatedState = {...state, currentStep: steps[currentIndex + 1]}
|
||||
} else if (action.type === 'Back' && state.currentStep !== 'Landing') {
|
||||
} else if (action.type === 'Back' && state.currentStep !== 'Details') {
|
||||
const currentIndex = steps.indexOf(state.currentStep)
|
||||
updatedState = {...state, currentStep: steps[currentIndex - 1]}
|
||||
}
|
||||
@@ -80,18 +80,18 @@ function reducer(state: State, action: Action): State {
|
||||
}
|
||||
|
||||
switch (updatedState.currentStep) {
|
||||
case 'Landing':
|
||||
updatedState = {
|
||||
...updatedState,
|
||||
canNext: true,
|
||||
}
|
||||
break
|
||||
case 'Details':
|
||||
updatedState = {
|
||||
...updatedState,
|
||||
canNext: Boolean(updatedState.description),
|
||||
}
|
||||
break
|
||||
default:
|
||||
updatedState = {
|
||||
...updatedState,
|
||||
canNext: true,
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
return updatedState
|
||||
@@ -100,7 +100,7 @@ function reducer(state: State, action: Action): State {
|
||||
// TODO supply the initial state to this component
|
||||
export function Provider({
|
||||
initialState,
|
||||
initialStep = 'Landing',
|
||||
initialStep = 'Details',
|
||||
children,
|
||||
}: {
|
||||
initialState?: any // TODO update this type
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {msg, Trans} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
|
||||
import {useProfileQuery} from 'state/queries/profile'
|
||||
@@ -9,6 +9,7 @@ import {useWizardState} from '#/screens/StarterPack/Wizard/State'
|
||||
import {atoms as a} from '#/alf'
|
||||
import * as TextField from '#/components/forms/TextField'
|
||||
import {StarterPackIcon} from '#/components/icons/StarterPackIcon'
|
||||
import {Text} from '#/components/Typography'
|
||||
|
||||
export function StepDetails() {
|
||||
const {_} = useLingui()
|
||||
@@ -21,10 +22,21 @@ export function StepDetails() {
|
||||
})
|
||||
|
||||
return (
|
||||
<View style={[a.px_xl, a.gap_xl, a.mt_md]}>
|
||||
<View style={[{height: 65, marginTop: 20, marginBottom: 50}]}>
|
||||
<View style={[a.px_xl, a.gap_2xl, a.mt_md]}>
|
||||
<View style={[{height: 65, marginTop: 20}]}>
|
||||
<StarterPackIcon />
|
||||
</View>
|
||||
<View style={[a.gap_xs, a.align_center]}>
|
||||
<Text style={[a.font_bold, a.text_4xl]}>
|
||||
<Trans>Invites, but personal</Trans>
|
||||
</Text>
|
||||
<Text style={[a.text_center, a.text_md, a.px_md]}>
|
||||
<Trans>
|
||||
Create your own Bluesky starter packs and invite people directly to
|
||||
your favorite feeds, profiles, and more.
|
||||
</Trans>
|
||||
</Text>
|
||||
</View>
|
||||
<View>
|
||||
<TextField.LabelText>{_(msg`Starter pack name`)}</TextField.LabelText>
|
||||
<TextField.Input
|
||||
|
||||
Reference in New Issue
Block a user