remove InfoCircle, alf places that used it

This commit is contained in:
Samuel Newman
2025-11-29 13:32:32 +02:00
parent 94999aad8e
commit 3b8b448ae1
3 changed files with 41 additions and 76 deletions
+17 -21
View File
@@ -1,33 +1,29 @@
import {StyleSheet, View} from 'react-native' import {View} from 'react-native'
import {usePalette} from '#/lib/hooks/usePalette'
import {InfoCircleIcon} from '#/lib/icons'
import {Text} from '#/view/com/util/text/Text'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfoIcon} from '#/components/icons/CircleInfo'
import {Text} from '#/components/Typography'
export function PostPlaceholder({children}: {children: React.ReactNode}) { export function PostPlaceholder({children}: {children: React.ReactNode}) {
const t = useTheme() const t = useTheme()
const pal = usePalette('default')
return ( return (
<View <View
style={[styles.errorContainer, a.border, t.atoms.border_contrast_low]}> style={[
<InfoCircleIcon size={18} style={pal.text} /> a.flex_row,
<Text type="lg" style={pal.text}> a.gap_xs,
a.rounded_md,
a.py_md,
a.px_md,
a.mt_sm,
a.align_center,
a.border,
t.atoms.border_contrast_low,
]}>
<CircleInfoIcon size="md" style={t.atoms.text_contrast_medium} />
<Text style={[a.text_md, t.atoms.text_contrast_medium, a.italic]}>
{children} {children}
</Text> </Text>
</View> </View>
) )
} }
const styles = StyleSheet.create({
errorContainer: {
flexDirection: 'row',
alignItems: 'center',
gap: 4,
borderRadius: 8,
marginTop: 8,
paddingVertical: 14,
paddingHorizontal: 14,
borderWidth: StyleSheet.hairlineWidth,
},
})
-27
View File
@@ -72,30 +72,3 @@ export function ComposeIcon2({
</Svg> </Svg>
) )
} }
export function InfoCircleIcon({
style,
size,
strokeWidth = 1.5,
}: {
style?: StyleProp<TextStyle>
size?: string | number
strokeWidth?: number
}) {
return (
<Svg
fill="none"
viewBox="0 0 24 24"
strokeWidth={strokeWidth}
stroke="currentColor"
width={size}
height={size}
style={style}>
<Path
strokeLinecap="round"
strokeLinejoin="round"
d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"
/>
</Svg>
)
}
+24 -28
View File
@@ -1,39 +1,35 @@
import {View} from 'react-native' import {View} from 'react-native'
import {Trans} from '@lingui/macro' import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {usePalette} from '#/lib/hooks/usePalette' import {atoms as a, useTheme} from '#/alf'
import {InfoCircleIcon} from '#/lib/icons' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfoIcon} from '#/components/icons/CircleInfo'
import {TextLink} from '../util/Link' import {InlineLinkText} from '#/components/Link'
import {Text} from '../util/text/Text' import {Text} from '#/components/Typography'
export function DiscoverFallbackHeader() { export function DiscoverFallbackHeader() {
const pal = usePalette('default') const t = useTheme()
const {_} = useLingui()
return ( return (
<View <View style={[a.flex_row, a.py_lg, t.atoms.bg_contrast_25]}>
style={[ <View
{ style={[
flexDirection: 'row', {width: 70, paddingLeft: 18, paddingRight: 10},
alignItems: 'center', a.align_center,
paddingVertical: 12, ]}>
paddingHorizontal: 12, <CircleInfoIcon width={36} style={t.atoms.text_contrast_medium} />
borderTopWidth: 1,
},
pal.border,
pal.viewLight,
]}>
<View style={{width: 68, paddingLeft: 12}}>
<InfoCircleIcon size={36} style={pal.textLight} strokeWidth={1.5} />
</View> </View>
<View style={{flex: 1}}> <View style={[a.flex_1, a.pr_lg]}>
<Text type="md" style={pal.text}> <Text style={[a.text_md, a.leading_snug]}>
<Trans> <Trans>
We ran out of posts from your follows. Here's the latest from{' '} We ran out of posts from your follows. Here's the latest from{' '}
<TextLink <InlineLinkText
type="md-medium" label={_(msg`Discover`)}
href="/profile/bsky.app/feed/whats-hot" to="/profile/bsky.app/feed/whats-hot"
text="Discover" style={[a.text_md, a.leading_snug, a.font_medium]}>
style={pal.link} Discover
/> </InlineLinkText>
. .
</Trans> </Trans>
</Text> </Text>