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