Threads v2 tweaks (#8467)
* fix error screen collapsing * use personx icon for blocked posts
This commit is contained in:
committed by
Eric Bailey
parent
d958b0f217
commit
24f379ac36
@@ -40,7 +40,7 @@ export function ThreadError({
|
|||||||
<Layout.Center>
|
<Layout.Center>
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.flex_1,
|
a.w_full,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
{
|
{
|
||||||
padding: OUTER_SPACE,
|
padding: OUTER_SPACE,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {useLingui} from '@lingui/react'
|
|||||||
|
|
||||||
import {LINEAR_AVI_WIDTH, OUTER_SPACE} from '#/screens/PostThread/const'
|
import {LINEAR_AVI_WIDTH, OUTER_SPACE} from '#/screens/PostThread/const'
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
|
import {PersonX_Stroke2_Corner0_Rounded as PersonXIcon} from '#/components/icons/Person'
|
||||||
import {Trash_Stroke2_Corner0_Rounded as TrashIcon} from '#/components/icons/Trash'
|
import {Trash_Stroke2_Corner0_Rounded as TrashIcon} from '#/components/icons/Trash'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
|
|
||||||
@@ -15,13 +16,13 @@ export type ThreadItemPostTombstoneProps = {
|
|||||||
export function ThreadItemPostTombstone({type}: ThreadItemPostTombstoneProps) {
|
export function ThreadItemPostTombstone({type}: ThreadItemPostTombstoneProps) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const copy = useMemo(() => {
|
const {copy, Icon} = useMemo(() => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'blocked':
|
case 'blocked':
|
||||||
return _(msg`Post blocked.`)
|
return {copy: _(msg`Post blocked.`), Icon: PersonXIcon}
|
||||||
case 'not-found':
|
case 'not-found':
|
||||||
default:
|
default:
|
||||||
return _(msg`Post not found.`)
|
return {copy: _(msg`Post not found.`), Icon: TrashIcon}
|
||||||
}
|
}
|
||||||
}, [_, type])
|
}, [_, type])
|
||||||
|
|
||||||
@@ -40,19 +41,10 @@ export function ThreadItemPostTombstone({type}: ThreadItemPostTombstoneProps) {
|
|||||||
a.align_center,
|
a.align_center,
|
||||||
a.rounded_sm,
|
a.rounded_sm,
|
||||||
t.atoms.bg_contrast_25,
|
t.atoms.bg_contrast_25,
|
||||||
{
|
{paddingVertical: OUTER_SPACE / 1.2},
|
||||||
paddingVertical: OUTER_SPACE / 1.2,
|
|
||||||
},
|
|
||||||
]}>
|
]}>
|
||||||
<View
|
<View style={[a.flex_row, a.justify_center, {width: LINEAR_AVI_WIDTH}]}>
|
||||||
style={[
|
<Icon style={[t.atoms.text_contrast_medium]} />
|
||||||
a.flex_row,
|
|
||||||
a.justify_center,
|
|
||||||
{
|
|
||||||
width: LINEAR_AVI_WIDTH,
|
|
||||||
},
|
|
||||||
]}>
|
|
||||||
<TrashIcon style={[t.atoms.text]} />
|
|
||||||
</View>
|
</View>
|
||||||
<Text style={[a.font_bold, a.text_md, t.atoms.text_contrast_medium]}>
|
<Text style={[a.font_bold, a.text_md, t.atoms.text_contrast_medium]}>
|
||||||
{copy}
|
{copy}
|
||||||
|
|||||||
Reference in New Issue
Block a user