@openpeepshq/rn-components 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/components/conversations/ConversationPreviewCard.tsx +2 -6
- package/src/components/custom/navigation/side-menu.test.tsx +212 -0
- package/src/components/custom/navigation/side-menu.tsx +3 -8
- package/src/components/groups/GroupCard.tsx +3 -6
- package/src/components/icons/index.ts +2 -0
- package/src/components/jams/JamChatDrawer.test.tsx +113 -41
- package/src/components/jams/JamChatDrawer.tsx +23 -20
- package/src/components/jams/JamVideoLayout.tsx +2 -2
- package/src/components/jams/useLateTrackMediaStream.test.ts +113 -24
- package/src/components/jams/useLateTrackMediaStream.ts +86 -24
- package/src/components/navigation/nativeRouter.tsx +13 -3
- package/src/components/notifications/NotificationHeaderActions.test.tsx +285 -0
- package/src/components/notifications/NotificationHeaderActions.tsx +91 -4
- package/src/components/notifications/NotificationsList.test.tsx +109 -0
- package/src/components/notifications/NotificationsList.tsx +13 -3
- package/src/components/notifications/types/Reaction.tsx +6 -2
- package/src/components/post/pieces/PostActions.test.tsx +244 -0
- package/src/components/post/pieces/PostActions.tsx +74 -49
- package/src/components/post/pieces/ReactionPicker.test.tsx +184 -0
- package/src/components/post/pieces/ReactionPicker.tsx +58 -0
- package/src/components/post/pieces/index.ts +1 -0
- package/src/components/post/pieces/modals/ReactionsModal.tsx +1 -1
- package/src/components/post/post-form/ResourceForm.tsx +1 -1
- package/src/components/profile/EditProfileForm.test.tsx +316 -0
- package/src/components/profile/EditProfileForm.tsx +33 -4
- package/src/components/ui/dropdown-menu.test.ts +332 -0
- package/src/components/ui/dropdown-menu.tsx +108 -19
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/unread-badge.test.tsx +111 -0
- package/src/components/ui/unread-badge.tsx +43 -0
- package/src/pages/Members.test.tsx +117 -0
- package/src/pages/Members.tsx +1 -1
- package/src/pages/Notifications.tsx +3 -1
- package/src/pages/Welcome.test.tsx +166 -0
- package/src/pages/Welcome.tsx +50 -4
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consumer-pin for the RN Members (directory) screen (issue #211 round-6
|
|
3
|
+
* review S1, native side).
|
|
4
|
+
*
|
|
5
|
+
* The behavioral contract is "the directory list is filtered, pickers are
|
|
6
|
+
* not". The server/SQL layer and the shared hook (`useProfiles(directory)` →
|
|
7
|
+
* `queryParams: { directory: 'true' }`) are already pinned; this pins the
|
|
8
|
+
* consumer wiring: if `platform/rn-components/src/pages/Members.tsx` ever
|
|
9
|
+
* reverts `useProfiles(true)` to plain `useProfiles()`, the directory screen
|
|
10
|
+
* silently falls back to the unfiltered picker list and this test fails.
|
|
11
|
+
*
|
|
12
|
+
* The component's only directory-facing surface is its `useProfiles` call, so
|
|
13
|
+
* the module boundary (`@openpeepshq/react`) is mocked with a `useProfiles`
|
|
14
|
+
* spy that records its argument; the rest of the screen renders for real
|
|
15
|
+
* under `react-test-renderer`.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const React = require('react');
|
|
19
|
+
const ReactTestRenderer = require('react-test-renderer');
|
|
20
|
+
|
|
21
|
+
jest.mock('react-native', () => ({
|
|
22
|
+
View: (props: Record<string, unknown>) =>
|
|
23
|
+
React.createElement('View', props, props.children),
|
|
24
|
+
Pressable: (props: Record<string, unknown>) =>
|
|
25
|
+
React.createElement('Pressable', props, props.children),
|
|
26
|
+
ActivityIndicator: () => null,
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
jest.mock('react-i18next', () => ({
|
|
30
|
+
useTranslation: () => ({ t: (key: string) => key }),
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
jest.mock('react-native-keyboard-aware-scroll-view', () => ({
|
|
34
|
+
KeyboardAwareScrollView: (props: { children?: unknown }) =>
|
|
35
|
+
React.createElement('KeyboardAwareScrollView', null, props.children),
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
jest.mock('../components/ui/themed-view', () => ({
|
|
39
|
+
ThemedView: (props: { children?: unknown }) =>
|
|
40
|
+
React.createElement('ThemedView', null, props.children),
|
|
41
|
+
}));
|
|
42
|
+
|
|
43
|
+
jest.mock('../components/layout', () => ({
|
|
44
|
+
useSetPageHeader: () => undefined,
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
jest.mock('../components/icons/index', () => ({
|
|
48
|
+
XIcon: () => null,
|
|
49
|
+
SearchIcon: () => null,
|
|
50
|
+
MessageSquareTextIcon: () => null,
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
jest.mock('../components/ui/input', () => ({
|
|
54
|
+
Input: () => null,
|
|
55
|
+
}));
|
|
56
|
+
|
|
57
|
+
jest.mock('../components/custom/index', () => ({
|
|
58
|
+
EmptyStateContainer: () => null,
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
jest.mock('../components/profile/index', () => ({
|
|
62
|
+
FollowUnfollowButton: () => null,
|
|
63
|
+
ProfileCard: () => null,
|
|
64
|
+
}));
|
|
65
|
+
|
|
66
|
+
jest.mock('../stores/useNewConversationStore', () => ({
|
|
67
|
+
useNewConversationStore: () => ({
|
|
68
|
+
clearMembers: () => {},
|
|
69
|
+
setContt: () => {},
|
|
70
|
+
setMember: () => {},
|
|
71
|
+
}),
|
|
72
|
+
}));
|
|
73
|
+
|
|
74
|
+
// `../lib/utils` transitively imports `react-native-config` (ESM) via
|
|
75
|
+
// `lib/constants`, which jest's CJS runtime cannot parse; the screen only
|
|
76
|
+
// uses `profileMatchesQuery` for its (empty) search filter, so a no-op is
|
|
77
|
+
// enough for this wiring pin.
|
|
78
|
+
jest.mock('../lib/utils', () => ({
|
|
79
|
+
profileMatchesQuery: () => true,
|
|
80
|
+
}));
|
|
81
|
+
|
|
82
|
+
const useProfilesMock = jest.fn(() => ({ data: undefined, isLoading: false }));
|
|
83
|
+
|
|
84
|
+
jest.mock('@openpeepshq/react', () => ({
|
|
85
|
+
useOpenpeeps: () => ({
|
|
86
|
+
openpeepsApi: { useProfiles: useProfilesMock },
|
|
87
|
+
currentProfile: undefined,
|
|
88
|
+
}),
|
|
89
|
+
}));
|
|
90
|
+
|
|
91
|
+
import { Members } from './Members';
|
|
92
|
+
|
|
93
|
+
describe('RN Members directory view consumer wiring (issue #211 S1)', () => {
|
|
94
|
+
beforeEach(() => {
|
|
95
|
+
(
|
|
96
|
+
globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }
|
|
97
|
+
).IS_REACT_ACT_ENVIRONMENT = true;
|
|
98
|
+
useProfilesMock.mockClear();
|
|
99
|
+
useProfilesMock.mockReturnValue({ data: undefined, isLoading: false });
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it('requests the profiles list as the directory view (useProfiles(true))', () => {
|
|
103
|
+
ReactTestRenderer.act(() => {
|
|
104
|
+
ReactTestRenderer.create(
|
|
105
|
+
React.createElement(Members, {
|
|
106
|
+
navigation: { navigate: () => {} },
|
|
107
|
+
} as unknown as never)
|
|
108
|
+
);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
expect(useProfilesMock).toHaveBeenCalled();
|
|
112
|
+
// The directory screen must opt into the filtered directory list. A
|
|
113
|
+
// revert to plain `useProfiles()` drops the argument (false) and fails
|
|
114
|
+
// here — the screen would then render the unfiltered picker list.
|
|
115
|
+
expect(useProfilesMock.mock.calls[0]![0]).toBe(true);
|
|
116
|
+
});
|
|
117
|
+
});
|
package/src/pages/Members.tsx
CHANGED
|
@@ -30,7 +30,7 @@ type DirectoryProps = CompositeScreenProps<
|
|
|
30
30
|
export const Members: React.FC<DirectoryProps> = ({ navigation }) => {
|
|
31
31
|
const { t } = useTranslation();
|
|
32
32
|
const { openpeepsApi, currentProfile } = useOpenpeeps();
|
|
33
|
-
const { data: profiles, isLoading } = openpeepsApi.useProfiles();
|
|
33
|
+
const { data: profiles, isLoading } = openpeepsApi.useProfiles(true);
|
|
34
34
|
const [filteredProfiles, setFilteredProfiles] = React.useState(profiles);
|
|
35
35
|
const [searchQuery, setSearchQuery] = React.useState('');
|
|
36
36
|
const [isSearchButtonClicked, setIsSearchButtonClicked] =
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ThemedView } from '../components/ui/themed-view';
|
|
3
|
-
import { useOpenpeeps } from '@openpeepshq/react';
|
|
3
|
+
import { useNotificationFeedFilter, useOpenpeeps } from '@openpeepshq/react';
|
|
4
4
|
import { useSetPageHeader } from '../components/layout';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import {
|
|
@@ -12,8 +12,10 @@ import { useNotificationBadgeReset } from '../hooks/use-notification-badge-reset
|
|
|
12
12
|
export const Notifications = () => {
|
|
13
13
|
const { openpeepsApi } = useOpenpeeps();
|
|
14
14
|
const { t } = useTranslation();
|
|
15
|
+
const { excludeTypes } = useNotificationFeedFilter();
|
|
15
16
|
const query = openpeepsApi.useCurrentProfileNotifications({
|
|
16
17
|
limit: 15,
|
|
18
|
+
excludeTypes,
|
|
17
19
|
});
|
|
18
20
|
const notificationStats = openpeepsApi.useCurrentProfileNotificationStats();
|
|
19
21
|
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression coverage for #1600 (RN parity) — the native Onboarding screen
|
|
3
|
+
* (the RN mirror of the web Welcome page) is guest-reachable, so a signed-out
|
|
4
|
+
* visitor must see the markdown welcome plus a Sign In CTA, NOT the signed-in
|
|
5
|
+
* setup checklist. The checklist is the only consumer of the disabled
|
|
6
|
+
* `usePostsByProfile('')` query, which never leaves `isPending` for a guest —
|
|
7
|
+
* rendering it would leave the checklist in a permanent loading spin (the bug
|
|
8
|
+
* fixed on the web side). Nothing else asserted that a guest opening this
|
|
9
|
+
* screen avoided that path.
|
|
10
|
+
*
|
|
11
|
+
* The node jest env has no native modules, so every external import is
|
|
12
|
+
* mocked (mirroring New.carryover.test.tsx); only the real `Welcome` under
|
|
13
|
+
* test renders, with its guest / signed-in branches driven by the mocked
|
|
14
|
+
* `useOpenpeeps`.
|
|
15
|
+
*/
|
|
16
|
+
import { type ReactNode } from 'react';
|
|
17
|
+
import ReactTestRenderer from 'react-test-renderer';
|
|
18
|
+
|
|
19
|
+
const React = require('react');
|
|
20
|
+
|
|
21
|
+
let mockCurrentProfile: {
|
|
22
|
+
id: string;
|
|
23
|
+
displayName?: string;
|
|
24
|
+
handle?: string;
|
|
25
|
+
} | null = null;
|
|
26
|
+
const mockNavigate = jest.fn();
|
|
27
|
+
|
|
28
|
+
// --- react-native: host elements render as plain host tags, props kept ----
|
|
29
|
+
jest.mock('react-native', () => {
|
|
30
|
+
const make = (tag: string) => (props: { children?: ReactNode }) =>
|
|
31
|
+
React.createElement(tag, props);
|
|
32
|
+
return {
|
|
33
|
+
View: make('View'),
|
|
34
|
+
Text: make('Text'),
|
|
35
|
+
ScrollView: make('ScrollView'),
|
|
36
|
+
TouchableOpacity: make('TouchableOpacity'),
|
|
37
|
+
Pressable: make('Pressable'),
|
|
38
|
+
ActivityIndicator: make('ActivityIndicator'),
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// --- shared @openpeepshq/react: drive the branch, capture navigation ------
|
|
43
|
+
jest.mock('@openpeepshq/react', () => ({
|
|
44
|
+
useOpenpeeps: () => ({
|
|
45
|
+
currentProfile: mockCurrentProfile,
|
|
46
|
+
currentAccount: { emailValidated: true },
|
|
47
|
+
openpeepsApi: {
|
|
48
|
+
useServerInfo: () => ({
|
|
49
|
+
data: {
|
|
50
|
+
communityConfig: {
|
|
51
|
+
info: { name: 'TestCo' },
|
|
52
|
+
content: { welcomePage: 'Welcome to TestCo' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
isLoading: false,
|
|
56
|
+
}),
|
|
57
|
+
// Disabled for guests (empty profile id) — mirrors the production
|
|
58
|
+
// wiring; only the render gate under test decides whether it is used.
|
|
59
|
+
usePostsByProfile: () => ({ data: { pages: [] }, isLoading: false }),
|
|
60
|
+
validationEmailAction: () => () => Promise.resolve({ success: true }),
|
|
61
|
+
},
|
|
62
|
+
}),
|
|
63
|
+
useRouter: () => ({ navigate: mockNavigate }),
|
|
64
|
+
}));
|
|
65
|
+
|
|
66
|
+
// --- i18n: resolve keys to their defaultValue, or a few known values ------
|
|
67
|
+
// (the guest row calls t(key) without a defaultValue, unlike the web page) --
|
|
68
|
+
jest.mock('react-i18next', () => ({
|
|
69
|
+
useTranslation: () => ({
|
|
70
|
+
t: (_key: string, opts?: { defaultValue?: string }) => {
|
|
71
|
+
const known: Record<string, string> = {
|
|
72
|
+
'welcome.guestSignIn':
|
|
73
|
+
'Sign in to complete your account setup and see the checklist.',
|
|
74
|
+
'auth.register.signIn': 'Sign In',
|
|
75
|
+
};
|
|
76
|
+
return opts?.defaultValue ?? known[_key] ?? _key;
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
// --- lucide icons: inert ---------------------------------------------------
|
|
82
|
+
jest.mock('lucide-react-native', () => {
|
|
83
|
+
const icon = (name: string) => () => React.createElement(name, null);
|
|
84
|
+
return {
|
|
85
|
+
UserCheckIcon: icon('UserCheckIcon'),
|
|
86
|
+
MailCheckIcon: icon('MailCheckIcon'),
|
|
87
|
+
SquareUserRoundIcon: icon('SquareUserRoundIcon'),
|
|
88
|
+
PencilIcon: icon('PencilIcon'),
|
|
89
|
+
ChevronRightIcon: icon('ChevronRightIcon'),
|
|
90
|
+
CheckIcon: icon('CheckIcon'),
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// --- local component deps: inert -------------------------------------------
|
|
95
|
+
jest.mock('react-native-toast-message', () => {
|
|
96
|
+
const Toast = { show: jest.fn() };
|
|
97
|
+
return { __esModule: true, default: Toast };
|
|
98
|
+
});
|
|
99
|
+
jest.mock('@react-navigation/native', () => ({
|
|
100
|
+
useNavigation: () => ({ navigate: jest.fn() }),
|
|
101
|
+
}));
|
|
102
|
+
jest.mock('@react-navigation/native-stack', () => ({}));
|
|
103
|
+
jest.mock('../components/layout', () => ({
|
|
104
|
+
useSetPageHeader: jest.fn(),
|
|
105
|
+
}));
|
|
106
|
+
jest.mock('../components/ui/themed-view', () => ({
|
|
107
|
+
ThemedView: ({ children }: { children?: ReactNode }) =>
|
|
108
|
+
React.createElement('View', null, children),
|
|
109
|
+
}));
|
|
110
|
+
jest.mock('../components/ui/themed-text', () => ({
|
|
111
|
+
ThemedText: ({ children }: { children?: ReactNode }) =>
|
|
112
|
+
React.createElement('Text', null, children),
|
|
113
|
+
}));
|
|
114
|
+
jest.mock('../components/markdown/index', () => ({
|
|
115
|
+
OpenpeepsMarkdown: ({ source }: { source: string }) =>
|
|
116
|
+
React.createElement('Markdown', null, source),
|
|
117
|
+
}));
|
|
118
|
+
jest.mock('../theme/useThemeOpacity', () => ({
|
|
119
|
+
useThemeOpacity: () => ({ background: () => 'rgba(0,0,0,0.1)' }),
|
|
120
|
+
}));
|
|
121
|
+
|
|
122
|
+
import { Welcome } from './Welcome';
|
|
123
|
+
|
|
124
|
+
describe('RN Welcome (Onboarding) guest parity', () => {
|
|
125
|
+
beforeEach(() => {
|
|
126
|
+
mockCurrentProfile = null;
|
|
127
|
+
mockNavigate.mockClear();
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it('shows a Sign In CTA (and no checklist) for a signed-out visitor', () => {
|
|
131
|
+
let tree: ReturnType<typeof ReactTestRenderer.create>;
|
|
132
|
+
ReactTestRenderer.act(() => {
|
|
133
|
+
tree = ReactTestRenderer.create(React.createElement(Welcome));
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// The guest CTA is rendered …
|
|
137
|
+
const [cta] = tree.root.findAllByProps({
|
|
138
|
+
testID: 'welcome-guest-sign-in',
|
|
139
|
+
});
|
|
140
|
+
// … and pressing it routes to the auth screen.
|
|
141
|
+
cta.props.onPress();
|
|
142
|
+
expect(mockNavigate).toHaveBeenCalledWith({ type: 'auth', mode: 'login' });
|
|
143
|
+
|
|
144
|
+
const json = JSON.stringify(tree.toJSON());
|
|
145
|
+
// The signed-in checklist must be absent — it is the only consumer of
|
|
146
|
+
// the disabled posts query, so rendering it is exactly the spin
|
|
147
|
+
// regression this test guards.
|
|
148
|
+
expect(json).not.toContain('Complete account setup');
|
|
149
|
+
// … while the guest copy and the CTA label are present.
|
|
150
|
+
expect(json).toContain('Sign in to complete your account setup');
|
|
151
|
+
expect(json).toContain('Sign In');
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it('shows the setup checklist (and no guest CTA) when signed in', () => {
|
|
155
|
+
mockCurrentProfile = { id: 'me', displayName: 'Me', handle: 'me' };
|
|
156
|
+
let tree: ReturnType<typeof ReactTestRenderer.create>;
|
|
157
|
+
ReactTestRenderer.act(() => {
|
|
158
|
+
tree = ReactTestRenderer.create(React.createElement(Welcome));
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
expect(
|
|
162
|
+
tree.root.findAllByProps({ testID: 'welcome-guest-sign-in' })
|
|
163
|
+
).toHaveLength(0);
|
|
164
|
+
expect(JSON.stringify(tree.toJSON())).toContain('Complete account setup');
|
|
165
|
+
});
|
|
166
|
+
});
|
package/src/pages/Welcome.tsx
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { ThemedView } from '../components/ui/themed-view';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
ActivityIndicator,
|
|
5
|
+
Pressable,
|
|
6
|
+
ScrollView,
|
|
7
|
+
TouchableOpacity,
|
|
8
|
+
View,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import { useOpenpeeps, useRouter } from '@openpeepshq/react';
|
|
5
11
|
import { useSetPageHeader } from '../components/layout';
|
|
6
12
|
import {
|
|
7
13
|
UserCheckIcon,
|
|
@@ -42,6 +48,7 @@ type AccountSetupChecklistItem = {
|
|
|
42
48
|
|
|
43
49
|
export const Welcome = () => {
|
|
44
50
|
const { openpeepsApi, currentProfile, currentAccount } = useOpenpeeps();
|
|
51
|
+
const router = useRouter();
|
|
45
52
|
const { t } = useTranslation();
|
|
46
53
|
const { data: serverInfo, isLoading } = openpeepsApi.useServerInfo();
|
|
47
54
|
const { data: posts, isLoading: isPostLoading } =
|
|
@@ -125,16 +132,55 @@ export const Welcome = () => {
|
|
|
125
132
|
|
|
126
133
|
useSetPageHeader(t('navigation.welcome'));
|
|
127
134
|
|
|
135
|
+
// Guest mirror of web Welcome.tsx: a signed-out visitor on the guest-reachable
|
|
136
|
+
// Onboarding screen sees the markdown welcome plus a Sign In CTA instead of
|
|
137
|
+
// the signed-in checklist — the checklist's posts query is disabled without a
|
|
138
|
+
// profile id and would leave the checklist in a permanent loading spin.
|
|
139
|
+
if (!currentProfile) {
|
|
140
|
+
return (
|
|
141
|
+
<ThemedView className="flex-1">
|
|
142
|
+
<ScrollView className="p-4 w-full">
|
|
143
|
+
{isLoading && <ActivityIndicator size={'small'} />}
|
|
144
|
+
<ThemedView className="w-full mt-2">
|
|
145
|
+
<ThemedText className="text-3xl font-bold mb-2">
|
|
146
|
+
{t('welcome.heading', {
|
|
147
|
+
name: serverInfo?.communityConfig?.info?.name,
|
|
148
|
+
})}
|
|
149
|
+
</ThemedText>
|
|
150
|
+
<OpenpeepsMarkdown
|
|
151
|
+
source={serverInfo?.communityConfig?.content?.welcomePage || ''}
|
|
152
|
+
/>
|
|
153
|
+
</ThemedView>
|
|
154
|
+
<View className="mt-4">
|
|
155
|
+
<ThemedText className="text-base text-muted-foreground">
|
|
156
|
+
{t('welcome.guestSignIn')}
|
|
157
|
+
</ThemedText>
|
|
158
|
+
<Pressable
|
|
159
|
+
testID="welcome-guest-sign-in"
|
|
160
|
+
onPress={() => router.navigate({ type: 'auth', mode: 'login' })}
|
|
161
|
+
>
|
|
162
|
+
<ThemedText className="text-base font-medium text-primary">
|
|
163
|
+
{t('auth.register.signIn')}
|
|
164
|
+
</ThemedText>
|
|
165
|
+
</Pressable>
|
|
166
|
+
</View>
|
|
167
|
+
</ScrollView>
|
|
168
|
+
</ThemedView>
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
128
172
|
return (
|
|
129
173
|
<ThemedView className="flex-1">
|
|
130
174
|
<ScrollView className="p-4 w-full">
|
|
131
175
|
{isLoading && <ActivityIndicator size={'small'} />}
|
|
132
176
|
<ThemedView className="w-full mt-2">
|
|
133
177
|
<ThemedText className="text-3xl font-bold mb-2">
|
|
134
|
-
|
|
178
|
+
{t('welcome.heading', {
|
|
179
|
+
name: serverInfo?.communityConfig?.info?.name,
|
|
180
|
+
})}
|
|
135
181
|
</ThemedText>
|
|
136
182
|
<OpenpeepsMarkdown
|
|
137
|
-
source={serverInfo?.communityConfig
|
|
183
|
+
source={serverInfo?.communityConfig?.content?.welcomePage || ''}
|
|
138
184
|
/>
|
|
139
185
|
</ThemedView>
|
|
140
186
|
<ThemedText className="text-3xl font-bold my-4">
|