cleanup landing

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