Skip to content

Commit 4fc0d5d

Browse files
Merge upstream develop
2 parents ad0d77d + 7739051 commit 4fc0d5d

15 files changed

Lines changed: 1052 additions & 716 deletions

File tree

Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/polycentric/src/common/components/List.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function NativeList<T>({
102102
onScroll={onScroll}
103103
scrollEventThrottle={16}
104104
contentContainerStyle={{
105+
...Atoms.flex_grow_1,
105106
paddingTop: headerHeight,
106107
...(typeof contentContainerStyle === 'object' &&
107108
contentContainerStyle !== null
@@ -190,7 +191,7 @@ function WebFeedViewer<T>({
190191
const visibleItems = isEmpty ? items : items.slice(0, visibleCount);
191192

192193
return (
193-
<View style={contentContainerStyle}>
194+
<View style={[Atoms.flex_1, contentContainerStyle]}>
194195
{renderNode(HeaderComponent)}
195196
{renderNode(ListHeaderComponent)}
196197
{isEmpty
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { Atoms } from '@/src/common/theme';
2+
import { type ReactNode } from 'react';
3+
import { View } from 'react-native';
4+
import { Text } from './primitives';
5+
6+
export function ListEmpty({ children }: { children: ReactNode }) {
7+
return (
8+
<View
9+
style={[
10+
Atoms.flex_1,
11+
Atoms.items_center,
12+
Atoms.justify_center,
13+
Atoms.p_lg,
14+
]}
15+
>
16+
{typeof children === 'string' ? (
17+
<Text variant="body" color="neutral_500">
18+
{children}
19+
</Text>
20+
) : (
21+
children
22+
)}
23+
</View>
24+
);
25+
}

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import type { FeedHookResult } from './hooks/types';
1010
import type { PostData } from '@/src/common/lib/polycentric-hooks';
1111
import { isWeb } from '@/src/common/util/platform';
12-
import { Text } from '@/src/common/components/primitives';
12+
import { ListEmpty } from '@/src/common/components/ListEmpty';
1313
import { Atoms, useTheme } from '@/src/common/theme';
1414
import { Post } from '../post/Post';
1515
import { PostSkeletonList } from '../post/PostSkeleton';
@@ -51,16 +51,7 @@ const FeedList = forwardRef<ListRef, FeedListProps>(function FeedList(
5151
feed.isLoading ? (
5252
<PostSkeletonList />
5353
) : (
54-
<View
55-
style={[
56-
Atoms.flex_1,
57-
Atoms.items_center,
58-
Atoms.justify_center,
59-
Atoms.p_lg,
60-
]}
61-
>
62-
<Text color="neutral_500">{emptyMessage}</Text>
63-
</View>
54+
<ListEmpty>{emptyMessage}</ListEmpty>
6455
)
6556
}
6657
ListFooterComponent={

apps/polycentric/src/features/verifications/RequestVerificationSheet.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Button, Text } from '@/src/common/components';
22
import { Sheet } from '@/src/common/components/sheet';
33
import { POLYCENTRIC_APP_URL } from '@/src/common/constants/app';
44
import { Atoms, useTheme } from '@/src/common/theme';
5-
import { Platform, Share, View } from 'react-native';
5+
import { Platform, Share } from 'react-native';
66
import { CopyLinkComponent } from './CopyLinkComponent';
77

88
// Native gets the OS share sheet; web only if the browser supports navigator.share.
@@ -38,11 +38,14 @@ export function RequestVerificationSheet({
3838
};
3939

4040
return (
41-
<Sheet open={open} onClose={onClose}>
42-
<View style={[Atoms.p_lg, Atoms.gap_md]}>
43-
<Text variant="title" style={theme.atoms.text}>
44-
Request verification
45-
</Text>
41+
<Sheet
42+
open={open}
43+
onClose={onClose}
44+
detents={[0.5]}
45+
scrollable
46+
header={<Sheet.Header title="Request verification" onClose={onClose} />}
47+
>
48+
<Sheet.Content style={Atoms.gap_md}>
4649
<Text variant="body" style={theme.atoms.text_neutral_medium}>
4750
Share this link to request verification of your claim.
4851
</Text>
@@ -57,7 +60,7 @@ export function RequestVerificationSheet({
5760
onPress={onShare}
5861
/>
5962
)}
60-
</View>
63+
</Sheet.Content>
6164
</Sheet>
6265
);
6366
}

0 commit comments

Comments
 (0)