Set up the global 'joined this week' (#4625)
parent
9e89ddeb1c
commit
ed940c637e
|
@ -13,6 +13,15 @@ export const EMBED_SERVICE = 'https://embed.bsky.app'
|
||||||
export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js`
|
export const EMBED_SCRIPT = `${EMBED_SERVICE}/static/embed.js`
|
||||||
export const BSKY_DOWNLOAD_URL = 'https://bsky.app/download'
|
export const BSKY_DOWNLOAD_URL = 'https://bsky.app/download'
|
||||||
|
|
||||||
|
// HACK
|
||||||
|
// Yes, this is exactly what it looks like. It's a hard-coded constant
|
||||||
|
// reflecting the number of new users in the last week. We don't have
|
||||||
|
// time to add a route to the servers for this so we're just going to hard
|
||||||
|
// code and update this number with each release until we can get the
|
||||||
|
// server route done.
|
||||||
|
// -prf
|
||||||
|
export const JOINED_THIS_WEEK = 37115 // as of June24 2024
|
||||||
|
|
||||||
const BASE_FEEDBACK_FORM_URL = `${HELP_DESK_URL}/requests/new`
|
const BASE_FEEDBACK_FORM_URL = `${HELP_DESK_URL}/requests/new`
|
||||||
export function FEEDBACK_FORM_URL({
|
export function FEEDBACK_FORM_URL({
|
||||||
email,
|
email,
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
import {JOINED_THIS_WEEK} from '#/lib/constants'
|
||||||
import {isAndroidWeb} from 'lib/browser'
|
import {isAndroidWeb} from 'lib/browser'
|
||||||
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
||||||
import {createStarterPackGooglePlayUri} from 'lib/strings/starter-pack'
|
import {createStarterPackGooglePlayUri} from 'lib/strings/starter-pack'
|
||||||
|
@ -21,6 +22,7 @@ import {
|
||||||
useActiveStarterPack,
|
useActiveStarterPack,
|
||||||
useSetActiveStarterPack,
|
useSetActiveStarterPack,
|
||||||
} from 'state/shell/starter-pack'
|
} from 'state/shell/starter-pack'
|
||||||
|
import {formatCount} from '#/view/com/util/numeric/format'
|
||||||
import {LoggedOutScreenState} from 'view/com/auth/LoggedOut'
|
import {LoggedOutScreenState} from 'view/com/auth/LoggedOut'
|
||||||
import {CenteredView} from 'view/com/util/Views'
|
import {CenteredView} from 'view/com/util/Views'
|
||||||
import {Logo} from 'view/icons/Logo'
|
import {Logo} from 'view/icons/Logo'
|
||||||
|
@ -95,7 +97,7 @@ function LandingScreenLoaded({
|
||||||
setScreenState: (state: LoggedOutScreenState) => void
|
setScreenState: (state: LoggedOutScreenState) => void
|
||||||
moderationOpts: ModerationOpts
|
moderationOpts: ModerationOpts
|
||||||
}) {
|
}) {
|
||||||
const {record, creator, listItemsSample, feeds, joinedWeekCount} = starterPack
|
const {record, creator, listItemsSample, feeds} = starterPack
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const activeStarterPack = useActiveStarterPack()
|
const activeStarterPack = useActiveStarterPack()
|
||||||
|
@ -200,24 +202,22 @@ function LandingScreenLoaded({
|
||||||
<Trans>Join Bluesky</Trans>
|
<Trans>Join Bluesky</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
</Button>
|
</Button>
|
||||||
{joinedWeekCount && joinedWeekCount >= 25 ? (
|
<View style={[a.flex_row, a.align_center, a.gap_sm]}>
|
||||||
<View style={[a.flex_row, a.align_center, a.gap_sm]}>
|
<FontAwesomeIcon
|
||||||
<FontAwesomeIcon
|
icon="arrow-trend-up"
|
||||||
icon="arrow-trend-up"
|
size={12}
|
||||||
size={12}
|
color={t.atoms.text_contrast_medium.color}
|
||||||
color={t.atoms.text_contrast_medium.color}
|
/>
|
||||||
/>
|
<Text
|
||||||
<Text
|
style={[
|
||||||
style={[
|
a.font_semibold,
|
||||||
a.font_semibold,
|
a.text_sm,
|
||||||
a.text_sm,
|
t.atoms.text_contrast_medium,
|
||||||
t.atoms.text_contrast_medium,
|
]}
|
||||||
]}
|
numberOfLines={1}>
|
||||||
numberOfLines={1}>
|
<Trans>{formatCount(JOINED_THIS_WEEK)} joined this week</Trans>
|
||||||
123,659 joined this week
|
</Text>
|
||||||
</Text>
|
</View>
|
||||||
</View>
|
|
||||||
) : null}
|
|
||||||
</View>
|
</View>
|
||||||
<View style={[a.gap_3xl]}>
|
<View style={[a.gap_3xl]}>
|
||||||
{Boolean(listItemsSample?.length) && (
|
{Boolean(listItemsSample?.length) && (
|
||||||
|
|
Loading…
Reference in New Issue