cleanup landing
This commit is contained in:
@@ -148,7 +148,7 @@ function LandingScreenInner({
|
|||||||
<Trans>Join Bluesky now</Trans>
|
<Trans>Join Bluesky now</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</Button>
|
</Button>
|
||||||
{joinedWeekCount && joinedWeekCount >= 25 && (
|
{joinedWeekCount && joinedWeekCount >= 25 ? (
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
a.font_bold,
|
a.font_bold,
|
||||||
@@ -158,10 +158,10 @@ function LandingScreenInner({
|
|||||||
]}>
|
]}>
|
||||||
{joinedWeekCount} joined this week!
|
{joinedWeekCount} joined this week!
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
) : null}
|
||||||
<Divider />
|
<Divider />
|
||||||
<View style={[a.gap_3xl]}>
|
<View style={[a.gap_3xl]}>
|
||||||
{Boolean(starterPack.feeds?.length) && (
|
{starterPack.feeds?.length ? (
|
||||||
<View style={[a.gap_md]}>
|
<View style={[a.gap_md]}>
|
||||||
<Text style={[a.font_bold, a.text_lg]}>
|
<Text style={[a.font_bold, a.text_lg]}>
|
||||||
Join Bluesky now to subscribe to these feeds
|
Join Bluesky now to subscribe to these feeds
|
||||||
@@ -182,9 +182,9 @@ function LandingScreenInner({
|
|||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)}
|
) : null}
|
||||||
|
|
||||||
{sampleProfiles?.length && (
|
{Boolean(sampleProfiles?.length) && (
|
||||||
<View style={[a.gap_md]}>
|
<View style={[a.gap_md]}>
|
||||||
<Text style={[a.font_bold, a.text_lg]}>
|
<Text style={[a.font_bold, a.text_lg]}>
|
||||||
{feeds?.length ? (
|
{feeds?.length ? (
|
||||||
@@ -203,12 +203,12 @@ function LandingScreenInner({
|
|||||||
a.py_md,
|
a.py_md,
|
||||||
a.gap_xl,
|
a.gap_xl,
|
||||||
]}>
|
]}>
|
||||||
{!!userSets.first?.length && (
|
{userSets.first?.length ? (
|
||||||
<ProfilesSet profiles={userSets.first} />
|
<ProfilesSet profiles={userSets.first} />
|
||||||
)}
|
) : null}
|
||||||
{!!userSets.second?.length && (
|
{userSets.second?.length ? (
|
||||||
<ProfilesSet profiles={userSets.second} />
|
<ProfilesSet profiles={userSets.second} />
|
||||||
)}
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -176,6 +176,12 @@ function WizardInner({
|
|||||||
}, [setMinimalShellMode]),
|
}, [setMinimalShellMode]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const defaultName = _(
|
||||||
|
msg`${
|
||||||
|
currentProfile?.displayName || `@${currentProfile?.handle}`
|
||||||
|
}'s Starter Pack`,
|
||||||
|
)
|
||||||
|
|
||||||
const wizardUiStrings: Record<
|
const wizardUiStrings: Record<
|
||||||
WizardStep,
|
WizardStep,
|
||||||
{header: string; nextBtn: string; subtitle?: string}
|
{header: string; nextBtn: string; subtitle?: string}
|
||||||
@@ -208,13 +214,7 @@ function WizardInner({
|
|||||||
const list = await agent.app.bsky.graph.list.create(
|
const list = await agent.app.bsky.graph.list.create(
|
||||||
{repo: currentAccount?.did},
|
{repo: currentAccount?.did},
|
||||||
{
|
{
|
||||||
name:
|
name: state.name ?? defaultName,
|
||||||
state.name ??
|
|
||||||
_(
|
|
||||||
msg`${
|
|
||||||
currentProfile?.displayName || `@${currentProfile?.handle}`
|
|
||||||
}'s Starter Pack`,
|
|
||||||
),
|
|
||||||
description: state.description,
|
description: state.description,
|
||||||
descriptionFacets: [],
|
descriptionFacets: [],
|
||||||
avatar: undefined,
|
avatar: undefined,
|
||||||
@@ -309,8 +309,8 @@ function WizardInner({
|
|||||||
collection: 'app.bsky.graph.starterpack',
|
collection: 'app.bsky.graph.starterpack',
|
||||||
rkey,
|
rkey,
|
||||||
record: {
|
record: {
|
||||||
name: state.name ?? '',
|
name: state.name ?? defaultName,
|
||||||
description: state.description ?? '',
|
description: state.description,
|
||||||
descriptionFacets: [],
|
descriptionFacets: [],
|
||||||
list: list?.uri,
|
list: list?.uri,
|
||||||
feeds: state.feeds.map(f => ({
|
feeds: state.feeds.map(f => ({
|
||||||
@@ -343,8 +343,8 @@ function WizardInner({
|
|||||||
validate: false,
|
validate: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: state.name ?? '',
|
name: state.name ?? defaultName,
|
||||||
description: state.description ?? '',
|
description: state.description,
|
||||||
descriptionFacets: [],
|
descriptionFacets: [],
|
||||||
list: list?.uri,
|
list: list?.uri,
|
||||||
feeds: state.feeds.map(f => ({
|
feeds: state.feeds.map(f => ({
|
||||||
@@ -395,14 +395,7 @@ function WizardInner({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onNext = () => {
|
const onNext = () => {
|
||||||
if (state.currentStep === 'Details' && !state.name) {
|
if (state.currentStep === 'Feeds') {
|
||||||
dispatch({
|
|
||||||
type: 'SetName',
|
|
||||||
name: _(
|
|
||||||
msg`${currentProfile?.displayName || currentProfile?.handle}'s`,
|
|
||||||
),
|
|
||||||
})
|
|
||||||
} else if (state.currentStep === 'Feeds') {
|
|
||||||
submit()
|
submit()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user