diff --git a/src/view/com/auth/onboarding/RecommendedFeeds.tsx b/src/view/com/auth/onboarding/RecommendedFeeds.tsx
index 4a3200168b..76204ce313 100644
--- a/src/view/com/auth/onboarding/RecommendedFeeds.tsx
+++ b/src/view/com/auth/onboarding/RecommendedFeeds.tsx
@@ -1,91 +1,10 @@
-import React from 'react'
-import {FlatList, StyleSheet, View} from 'react-native'
-import {Text} from 'view/com/util/text/Text'
-import {usePalette} from 'lib/hooks/usePalette'
-import {Button} from 'view/com/util/forms/Button'
-import {observer} from 'mobx-react-lite'
-import {CustomFeed} from 'view/com/feeds/CustomFeed'
-import {useCustomFeed} from 'lib/hooks/useCustomFeed'
-import {makeRecordUri} from 'lib/strings/url-helpers'
-import {ViewHeader} from 'view/com/util/ViewHeader'
-import {isDesktopWeb} from 'platform/detection'
-import {RECOMMENDED_FEEDS} from 'lib/constants'
+import 'react'
+import {withBreakpoints} from 'view/com/util/layouts/withBreakpoints'
+import {RecommendedFeedsDesktop} from './RecommendedFeedsDesktop'
+import {RecommendedFeedsMobile} from './RecommendedFeedsMobile'
-type Props = {
- next: () => void
-}
-export const RecommendedFeeds = observer(({next}: Props) => {
- const pal = usePalette('default')
-
- return (
-
-
-
- Check out some recommended feeds. Tap + to add them to your list of
- pinned feeds.
-
-
- }
- keyExtractor={item => item.did + item.rkey}
- style={{flex: 1}}
- />
-
-
-
- )
-})
-
-type ItemProps = {
- did: string
- rkey: string
-}
-
-const Item = ({item}: {item: ItemProps}) => {
- const uri = makeRecordUri(item.did, 'app.bsky.feed.generator', item.rkey)
- const data = useCustomFeed(uri)
- if (!data) return null
- return (
-
- )
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: 'space-between',
- },
- header: {
- marginBottom: 16,
- marginHorizontal: 16,
- },
- button: {
- marginBottom: 24,
- marginHorizontal: 16,
- marginTop: 16,
- },
- buttonText: {
- textAlign: 'center',
- fontSize: 18,
- paddingVertical: 4,
- },
-})
+export const RecommendedFeeds = withBreakpoints(
+ RecommendedFeedsMobile,
+ RecommendedFeedsMobile,
+ RecommendedFeedsDesktop,
+)
diff --git a/src/view/com/auth/onboarding/RecommendedFeeds.web.tsx b/src/view/com/auth/onboarding/RecommendedFeedsDesktop.tsx
similarity index 98%
rename from src/view/com/auth/onboarding/RecommendedFeeds.web.tsx
rename to src/view/com/auth/onboarding/RecommendedFeedsDesktop.tsx
index 9038c7a5a6..d305f4a828 100644
--- a/src/view/com/auth/onboarding/RecommendedFeeds.web.tsx
+++ b/src/view/com/auth/onboarding/RecommendedFeedsDesktop.tsx
@@ -17,7 +17,7 @@ import {RECOMMENDED_FEEDS} from 'lib/constants'
type Props = {
next: () => void
}
-export const RecommendedFeeds = observer(({next}: Props) => {
+export const RecommendedFeedsDesktop = observer(({next}: Props) => {
const pal = usePalette('default')
const title = (
diff --git a/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx b/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx
new file mode 100644
index 0000000000..b84b75df76
--- /dev/null
+++ b/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx
@@ -0,0 +1,95 @@
+import React from 'react'
+import {FlatList, StyleSheet, View} from 'react-native'
+import {Text} from 'view/com/util/text/Text'
+import {usePalette} from 'lib/hooks/usePalette'
+import {Button} from 'view/com/util/forms/Button'
+import {observer} from 'mobx-react-lite'
+import {CustomFeed} from 'view/com/feeds/CustomFeed'
+import {useCustomFeed} from 'lib/hooks/useCustomFeed'
+import {makeRecordUri} from 'lib/strings/url-helpers'
+import {ViewHeader} from 'view/com/util/ViewHeader'
+import {isDesktopWeb} from 'platform/detection'
+import {RECOMMENDED_FEEDS} from 'lib/constants'
+
+type Props = {
+ next: () => void
+}
+export const RecommendedFeedsMobile = observer(({next}: Props) => {
+ const pal = usePalette('default')
+
+ return (
+
+
+
+ Check out some recommended feeds. Tap + to add them to your list of
+ pinned feeds.
+
+
+ }
+ keyExtractor={item => item.did + item.rkey}
+ style={{flex: 1}}
+ />
+
+
+
+ )
+})
+
+type ItemProps = {
+ did: string
+ rkey: string
+}
+
+const Item = ({item}: {item: ItemProps}) => {
+ const uri = makeRecordUri(item.did, 'app.bsky.feed.generator', item.rkey)
+ const data = useCustomFeed(uri)
+ if (!data) return null
+ return (
+
+ )
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: 'space-between',
+ },
+ header: {
+ marginBottom: 16,
+ marginHorizontal: 16,
+ },
+ button: {
+ marginBottom: 24,
+ marginHorizontal: 16,
+ marginTop: 16,
+ },
+ buttonText: {
+ textAlign: 'center',
+ fontSize: 18,
+ paddingVertical: 4,
+ },
+})
diff --git a/src/view/com/auth/onboarding/Welcome.tsx b/src/view/com/auth/onboarding/Welcome.tsx
index 6f95c08539..b44b58f843 100644
--- a/src/view/com/auth/onboarding/Welcome.tsx
+++ b/src/view/com/auth/onboarding/Welcome.tsx
@@ -1,123 +1,10 @@
-import React from 'react'
-import {Pressable, StyleSheet, View} from 'react-native'
-import {Text} from 'view/com/util/text/Text'
-import {s} from 'lib/styles'
-import {usePalette} from 'lib/hooks/usePalette'
-import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
-import {Button} from 'view/com/util/forms/Button'
-import {observer} from 'mobx-react-lite'
-import {ViewHeader} from 'view/com/util/ViewHeader'
-import {isDesktopWeb} from 'platform/detection'
+import 'react'
+import {withBreakpoints} from 'view/com/util/layouts/withBreakpoints'
+import {WelcomeDesktop} from './WelcomeDesktop'
+import {WelcomeMobile} from './WelcomeMobile'
-type Props = {
- next: () => void
- skip: () => void
-}
-
-export const Welcome = observer(({next, skip}: Props) => {
- const pal = usePalette('default')
-
- return (
-
- {
- return (
-
- Skip
-
-
- )
- }}
- />
-
-
- Welcome to{' '}
- Bluesky
-
-
-
-
-
-
- Bluesky is public.
-
-
- Your posts, likes, and blocks are public. Mutes are private.
-
-
-
-
-
-
-
- Bluesky is open.
-
-
- Never lose access to your followers and data.
-
-
-
-
-
-
-
- Bluesky is flexible.
-
-
- Choose the algorithms that power your experience with custom
- feeds.
-
-
-
-
-
-
-
- )
-})
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- marginBottom: isDesktopWeb ? 30 : 60,
- marginHorizontal: 16,
- justifyContent: 'space-between',
- },
- title: {
- fontSize: 42,
- fontWeight: '800',
- },
- row: {
- flexDirection: 'row',
- columnGap: 20,
- alignItems: 'center',
- marginVertical: 20,
- },
- rowText: {
- flex: 1,
- },
- spacer: {
- height: 20,
- },
- buttonText: {
- textAlign: 'center',
- fontSize: 18,
- marginVertical: 4,
- },
-})
+export const Welcome = withBreakpoints(
+ WelcomeMobile,
+ WelcomeDesktop,
+ WelcomeDesktop,
+)
diff --git a/src/view/com/auth/onboarding/Welcome.web.tsx b/src/view/com/auth/onboarding/WelcomeDesktop.tsx
similarity index 98%
rename from src/view/com/auth/onboarding/Welcome.web.tsx
rename to src/view/com/auth/onboarding/WelcomeDesktop.tsx
index af3ca7074f..e63693443e 100644
--- a/src/view/com/auth/onboarding/Welcome.web.tsx
+++ b/src/view/com/auth/onboarding/WelcomeDesktop.tsx
@@ -14,7 +14,7 @@ type Props = {
skip: () => void
}
-export const Welcome = observer(({next}: Props) => {
+export const WelcomeDesktop = observer(({next}: Props) => {
const pal = usePalette('default')
const horizontal = useMediaQuery({
query: '(min-width: 1230px)',
diff --git a/src/view/com/auth/onboarding/WelcomeMobile.tsx b/src/view/com/auth/onboarding/WelcomeMobile.tsx
new file mode 100644
index 0000000000..eb72de836b
--- /dev/null
+++ b/src/view/com/auth/onboarding/WelcomeMobile.tsx
@@ -0,0 +1,123 @@
+import React from 'react'
+import {Pressable, StyleSheet, View} from 'react-native'
+import {Text} from 'view/com/util/text/Text'
+import {s} from 'lib/styles'
+import {usePalette} from 'lib/hooks/usePalette'
+import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
+import {Button} from 'view/com/util/forms/Button'
+import {observer} from 'mobx-react-lite'
+import {ViewHeader} from 'view/com/util/ViewHeader'
+import {isDesktopWeb} from 'platform/detection'
+
+type Props = {
+ next: () => void
+ skip: () => void
+}
+
+export const WelcomeMobile = observer(({next, skip}: Props) => {
+ const pal = usePalette('default')
+
+ return (
+
+ {
+ return (
+
+ Skip
+
+
+ )
+ }}
+ />
+
+
+ Welcome to{' '}
+ Bluesky
+
+
+
+
+
+
+ Bluesky is public.
+
+
+ Your posts, likes, and blocks are public. Mutes are private.
+
+
+
+
+
+
+
+ Bluesky is open.
+
+
+ Never lose access to your followers and data.
+
+
+
+
+
+
+
+ Bluesky is flexible.
+
+
+ Choose the algorithms that power your experience with custom
+ feeds.
+
+
+
+
+
+
+
+ )
+})
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginBottom: isDesktopWeb ? 30 : 60,
+ marginHorizontal: 16,
+ justifyContent: 'space-between',
+ },
+ title: {
+ fontSize: 42,
+ fontWeight: '800',
+ },
+ row: {
+ flexDirection: 'row',
+ columnGap: 20,
+ alignItems: 'center',
+ marginVertical: 20,
+ },
+ rowText: {
+ flex: 1,
+ },
+ spacer: {
+ height: 20,
+ },
+ buttonText: {
+ textAlign: 'center',
+ fontSize: 18,
+ marginVertical: 4,
+ },
+})
diff --git a/src/view/com/util/layouts/withBreakpoints.tsx b/src/view/com/util/layouts/withBreakpoints.tsx
new file mode 100644
index 0000000000..4214c1040a
--- /dev/null
+++ b/src/view/com/util/layouts/withBreakpoints.tsx
@@ -0,0 +1,22 @@
+import React from 'react'
+import {useMediaQuery} from 'react-responsive'
+import {isNative} from 'platform/detection'
+
+export const withBreakpoints =
+
(
+ Mobile: React.ComponentType
,
+ Tablet: React.ComponentType
,
+ Desktop: React.ComponentType
,
+ ): React.FC
=>
+ (props: P) => {
+ const isTabletOrMobile = useMediaQuery({query: '(max-width: 1224px)'})
+ const isMobile = useMediaQuery({query: '(max-width: 800px)'})
+
+ if (isMobile || isNative) {
+ return
+ }
+ if (isTabletOrMobile) {
+ return
+ }
+ return
+ }