Skip to content

Commit 7030026

Browse files
Mark HardingMark Harding
authored andcommitted
Add trust screen
Changelog: feature
1 parent 56f15f7 commit 7030026

5 files changed

Lines changed: 55 additions & 12 deletions

File tree

apps/polycentric/app/(tabs)/_layout.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function TabsLayout() {
2222
>
2323
<NativeTabs.Trigger name="feed">
2424
<NativeTabs.Trigger.Label>Feed</NativeTabs.Trigger.Label>
25-
<NativeTabs.Trigger.Icon sf="house.fill" md="home" />
25+
<NativeTabs.Trigger.Icon sf="house" md="home" />
2626
</NativeTabs.Trigger>
2727

2828
<NativeTabs.Trigger name="explore">
@@ -32,7 +32,12 @@ export default function TabsLayout() {
3232

3333
<NativeTabs.Trigger name="activity">
3434
<NativeTabs.Trigger.Label>Activity</NativeTabs.Trigger.Label>
35-
<NativeTabs.Trigger.Icon sf="bell.fill" md="notifications" />
35+
<NativeTabs.Trigger.Icon sf="bell" md="notifications" />
36+
</NativeTabs.Trigger>
37+
38+
<NativeTabs.Trigger name="trust">
39+
<NativeTabs.Trigger.Label>Trust</NativeTabs.Trigger.Label>
40+
<NativeTabs.Trigger.Icon sf="checkmark.seal" md="key" />
3641
</NativeTabs.Trigger>
3742

3843
{isIOS ? (
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@/src/features/trust/TrustScreen';

apps/polycentric/src/common/components/layout/Layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ function PrimaryColumn({ children }: PrimaryColumnProps) {
8888
style={[
8989
Atoms.flex_1,
9090
isWeb && Atoms.pb_lg,
91-
!isWeb && { paddingBottom: insets.bottom },
9291
isWeb && {
9392
maxWidth: 600,
9493
borderLeftColor: theme.palette.neutral_25,

apps/polycentric/src/features/feed/FeedList.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Text } from '@/src/common/components/primitives';
1111
import { Atoms, useTheme } from '@/src/common/theme';
1212
import { Post } from '../post/Post';
1313
import { PostSkeletonList } from '../post/PostSkeleton';
14+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
1415

1516
export type FeedListProps = Omit<ListProps<PostData>, 'data' | 'renderItem'> & {
1617
feed: FeedHookResult;
@@ -33,6 +34,8 @@ export default function FeedList({
3334
}: FeedListProps) {
3435
const { theme } = useTheme();
3536

37+
const insets = useSafeAreaInsets();
38+
3639
return (
3740
<List<PostData>
3841
renderItem={renderItem}
@@ -55,15 +58,17 @@ export default function FeedList({
5558
)
5659
}
5760
ListFooterComponent={
58-
feed.hasMore && feed.items.length > 0 ? (
59-
<View style={[Atoms.items_center, Atoms.p_lg]}>
60-
<ActivityIndicator
61-
size="small"
62-
color={theme.palette.neutral_500}
63-
accessibilityLabel="Loading more posts"
64-
/>
65-
</View>
66-
) : null
61+
<View style={[!isWeb && { paddingBottom: insets.bottom }]}>
62+
{feed.hasMore && feed.items.length > 0 ? (
63+
<View style={[Atoms.items_center, Atoms.p_lg]}>
64+
<ActivityIndicator
65+
size="small"
66+
color={theme.palette.neutral_500}
67+
accessibilityLabel="Loading more posts"
68+
/>
69+
</View>
70+
) : null}
71+
</View>
6772
}
6873
onEndReached={feed.hasMore ? feed.loadMore : undefined}
6974
onEndReachedThreshold={0.5}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Text } from '@/src/common/components';
2+
import { Screen } from '@/src/common/components/layout';
3+
import Topbar from '@/src/common/components/layout/Topbar';
4+
import { Atoms } from '@/src/common/theme';
5+
import { FlashList } from '@shopify/flash-list';
6+
import { View } from 'react-native';
7+
import { List } from '@/src/common/components/List';
8+
9+
export default function TrustScreen() {
10+
return (
11+
<Screen>
12+
<Screen.PrimaryColumn>
13+
<List
14+
data={[]}
15+
renderItem={() => <></>}
16+
HeaderComponent={<Topbar title="Trust" />}
17+
ListEmptyComponent={() => (
18+
<View
19+
style={[
20+
Atoms.flex_1,
21+
Atoms.items_center,
22+
Atoms.justify_center,
23+
Atoms.p_lg,
24+
]}
25+
>
26+
<Text color="neutral_500">Coming soon</Text>
27+
</View>
28+
)}
29+
/>
30+
</Screen.PrimaryColumn>
31+
</Screen>
32+
);
33+
}

0 commit comments

Comments
 (0)