@planningcenter/chat-react-native 1.4.3-rc.0 → 1.5.0-rc.1
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/build/components/conversations.d.ts +1 -1
- package/build/components/conversations.d.ts.map +1 -1
- package/build/components/conversations.js +7 -18
- package/build/components/conversations.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/navigation/index.d.ts +53 -0
- package/build/navigation/index.d.ts.map +1 -0
- package/build/navigation/index.js +33 -0
- package/build/navigation/index.js.map +1 -0
- package/build/navigation/screenLayout.d.ts +5 -0
- package/build/navigation/screenLayout.d.ts.map +1 -0
- package/build/navigation/screenLayout.js +13 -0
- package/build/navigation/screenLayout.js.map +1 -0
- package/build/screens/conversation_screen.d.ts +8 -0
- package/build/screens/conversation_screen.d.ts.map +1 -0
- package/build/screens/conversation_screen.js +16 -0
- package/build/screens/conversation_screen.js.map +1 -0
- package/build/screens/conversations_screen.d.ts +8 -0
- package/build/screens/conversations_screen.d.ts.map +1 -0
- package/build/screens/conversations_screen.js +16 -0
- package/build/screens/conversations_screen.js.map +1 -0
- package/build/screens/not_found.d.ts +3 -0
- package/build/screens/not_found.d.ts.map +1 -0
- package/build/screens/not_found.js +18 -0
- package/build/screens/not_found.js.map +1 -0
- package/package.json +4 -3
- package/src/components/conversations.tsx +11 -24
- package/src/index.tsx +1 -0
- package/src/navigation/index.tsx +42 -0
- package/src/navigation/screenLayout.tsx +17 -0
- package/src/screens/conversation_screen.tsx +25 -0
- package/src/screens/conversations_screen.tsx +25 -0
- package/src/screens/not_found.tsx +21 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,eAAO,MAAM,aAAa,yBA4BzB,CAAA"}
|
|
@@ -1,30 +1,19 @@
|
|
|
1
1
|
import { useNavigation } from '@react-navigation/native';
|
|
2
|
-
import {
|
|
3
|
-
import React
|
|
2
|
+
import { useSuspenseQuery } from '@tanstack/react-query';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { FlatList, Pressable, StyleSheet } from 'react-native';
|
|
5
|
-
import { ChatContext } from '../contexts/chat_context';
|
|
6
5
|
import { useTheme } from '../hooks';
|
|
7
6
|
import { Text } from './display';
|
|
8
|
-
|
|
9
|
-
export function Conversations() {
|
|
10
|
-
const { token } = useContext(ChatContext);
|
|
11
|
-
if (!token)
|
|
12
|
-
return null;
|
|
13
|
-
return (<QueryErrorResetBoundary>
|
|
14
|
-
{({ reset }) => (<ErrorBoundary onReset={reset}>
|
|
15
|
-
<Suspense fallback={<Text>loading...</Text>}>
|
|
16
|
-
<Loaded />
|
|
17
|
-
</Suspense>
|
|
18
|
-
</ErrorBoundary>)}
|
|
19
|
-
</QueryErrorResetBoundary>);
|
|
20
|
-
}
|
|
21
|
-
const Loaded = () => {
|
|
7
|
+
export const Conversations = () => {
|
|
22
8
|
const styles = useStyles();
|
|
23
9
|
const { data: conversations } = useSuspenseQuery({
|
|
24
10
|
queryKey: ['/chat/v2/me/conversations'],
|
|
25
11
|
});
|
|
26
12
|
const navigation = useNavigation();
|
|
27
|
-
return (<FlatList data={conversations?.data} contentContainerStyle={styles.container} style={styles.scrollView} ListEmptyComponent={<Text>No conversations found</Text>} ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>} renderItem={({ item }) => (<Pressable onPress={() => navigation.navigate('
|
|
13
|
+
return (<FlatList data={conversations?.data} contentContainerStyle={styles.container} style={styles.scrollView} ListEmptyComponent={<Text>No conversations found</Text>} ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>} renderItem={({ item }) => (<Pressable onPress={() => navigation.navigate('Conversation', {
|
|
14
|
+
conversation_id: item.id,
|
|
15
|
+
chat_group_graph_id: item.id,
|
|
16
|
+
})}>
|
|
28
17
|
<Text style={styles.listItem}>{item.attributes.title}</Text>
|
|
29
18
|
</Pressable>)}/>);
|
|
30
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/components/conversations.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAIhC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAwB;QACtE,QAAQ,EAAE,CAAC,2BAA2B,CAAC;KACxC,CAAC,CAAA;IACF,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAElC,OAAO,CACL,CAAC,QAAQ,CACP,IAAI,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,CAC1B,qBAAqB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CACxC,KAAK,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CACzB,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,CACxD,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CACnE,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACxB,CAAC,SAAS,CACR,OAAO,CAAC,CAAC,GAAG,EAAE,CACZ,UAAU,CAAC,QAAQ,CAAC,cAAc,EAAE;gBAClC,eAAe,EAAE,IAAI,CAAC,EAAE;gBACxB,mBAAmB,EAAE,IAAI,CAAC,EAAE;aAC7B,CACH,CAAC,CAED;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,IAAI,CAC7D;QAAA,EAAE,SAAS,CAAC,CACb,CAAC,EACF,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,mBAAmB,EAAE;QACpE,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;QAClC,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE;QAC9C,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,mBAAmB,EAAE;KAChD,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { ConversationResource, JSONAPICollection } from '@planningcenter/chat-core'\nimport { useNavigation } from '@react-navigation/native'\nimport { useSuspenseQuery } from '@tanstack/react-query'\nimport React from 'react'\nimport { FlatList, Pressable, StyleSheet } from 'react-native'\nimport { useTheme } from '../hooks'\nimport { Text } from './display'\n\ntype ConversationsResponse = JSONAPICollection<ConversationResource>\n\nexport const Conversations = () => {\n const styles = useStyles()\n const { data: conversations } = useSuspenseQuery<ConversationsResponse>({\n queryKey: ['/chat/v2/me/conversations'],\n })\n const navigation = useNavigation()\n\n return (\n <FlatList\n data={conversations?.data}\n contentContainerStyle={styles.container}\n style={styles.scrollView}\n ListEmptyComponent={<Text>No conversations found</Text>}\n ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>}\n renderItem={({ item }) => (\n <Pressable\n onPress={() =>\n navigation.navigate('Conversation', {\n conversation_id: item.id,\n chat_group_graph_id: item.id,\n })\n }\n >\n <Text style={styles.listItem}>{item.attributes.title}</Text>\n </Pressable>\n )}\n />\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n scrollView: { flex: 1, backgroundColor: colors.fillColorNeutral090 },\n container: { gap: 8, padding: 16 },\n foo: { fontSize: 24, color: colors.testColor },\n listItem: { color: colors.fillColorNeutral020 },\n })\n}\n"]}
|
package/build/index.d.ts
CHANGED
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA"}
|
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA","sourcesContent":["export * from './components'\nexport * from './contexts'\nexport * from './hooks'\nexport * from './screens'\nexport * from './utils'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA","sourcesContent":["export * from './components'\nexport * from './contexts'\nexport * from './hooks'\nexport * from './screens'\nexport * from './utils'\nexport * from './navigation'\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StaticParamList } from '@react-navigation/native';
|
|
3
|
+
import { NotFound } from '../screens/not_found';
|
|
4
|
+
import { ScreenLayout } from './screenLayout';
|
|
5
|
+
import { ConversationsScreen } from '../screens/conversations_screen';
|
|
6
|
+
import { ConversationScreen } from '../screens/conversation_screen';
|
|
7
|
+
export declare const ChatStack: import("@react-navigation/native").TypedNavigator<{
|
|
8
|
+
ParamList: import("@react-navigation/native").ParamListBase;
|
|
9
|
+
NavigatorID: undefined;
|
|
10
|
+
State: import("@react-navigation/native").StackNavigationState<import("@react-navigation/native").ParamListBase>;
|
|
11
|
+
ScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
12
|
+
EventMap: import("@react-navigation/native-stack").NativeStackNavigationEventMap;
|
|
13
|
+
NavigationList: {
|
|
14
|
+
[x: string]: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
|
|
15
|
+
};
|
|
16
|
+
Navigator: ({ id, initialRouteName, children, layout, screenListeners, screenOptions, screenLayout, UNSTABLE_getStateForRouteNamesChange, ...rest }: import("@react-navigation/native-stack").NativeStackNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
}, {
|
|
18
|
+
readonly screenLayout: typeof ScreenLayout;
|
|
19
|
+
readonly screens: {
|
|
20
|
+
readonly Conversations: {
|
|
21
|
+
readonly screen: typeof ConversationsScreen;
|
|
22
|
+
readonly options: ({ route, navigation }: {
|
|
23
|
+
route: import("@react-navigation/native").RouteProp<import("@react-navigation/native").ParamListBase, string>;
|
|
24
|
+
navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
|
|
25
|
+
theme: ReactNavigation.Theme;
|
|
26
|
+
}) => {
|
|
27
|
+
headerTitle: string;
|
|
28
|
+
headerLeft: () => React.JSX.Element;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
readonly Conversation: {
|
|
32
|
+
readonly screen: typeof ConversationScreen;
|
|
33
|
+
};
|
|
34
|
+
readonly NotFound: {
|
|
35
|
+
readonly screen: typeof NotFound;
|
|
36
|
+
readonly options: {
|
|
37
|
+
readonly title: "404";
|
|
38
|
+
};
|
|
39
|
+
readonly linking: {
|
|
40
|
+
readonly path: "*";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
type ChatStackParamList = StaticParamList<typeof ChatStack>;
|
|
46
|
+
declare global {
|
|
47
|
+
namespace ReactNavigation {
|
|
48
|
+
interface RootParamList extends ChatStackParamList {
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAGnE,eAAO,MAAM,SAAS;;;;;;;;;uOAClB,mBAAmB;;;;;;;;;uBAgC81hB,gBAAiB,KAAK;;;;;;;;;;;;;;;;;;;EATz4hB,CAAA;AAEF,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,SAAS,CAAC,CAAA;AAE3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,eAAe,CAAC;QACxB,UAAU,aAAc,SAAQ,kBAAkB;SAAG;KACtD;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
|
3
|
+
import { NotFound } from '../screens/not_found';
|
|
4
|
+
import { ScreenLayout } from './screenLayout';
|
|
5
|
+
import { ConversationsScreen } from '../screens/conversations_screen';
|
|
6
|
+
import { ConversationScreen } from '../screens/conversation_screen';
|
|
7
|
+
import { HeaderBackButton } from '@react-navigation/elements';
|
|
8
|
+
export const ChatStack = createNativeStackNavigator({
|
|
9
|
+
screenLayout: ScreenLayout,
|
|
10
|
+
screens: {
|
|
11
|
+
Conversations: {
|
|
12
|
+
screen: ConversationsScreen,
|
|
13
|
+
options: ({ route, navigation }) => ({
|
|
14
|
+
headerTitle: route.params?.title ?? 'Conversations',
|
|
15
|
+
// This goes back on the parent so it doesn't automatically show up on the first screen
|
|
16
|
+
headerLeft: () => <HeaderBackButton onPress={navigation.goBack}/>,
|
|
17
|
+
}),
|
|
18
|
+
},
|
|
19
|
+
Conversation: {
|
|
20
|
+
screen: ConversationScreen,
|
|
21
|
+
},
|
|
22
|
+
NotFound: {
|
|
23
|
+
screen: NotFound,
|
|
24
|
+
options: {
|
|
25
|
+
title: '404',
|
|
26
|
+
},
|
|
27
|
+
linking: {
|
|
28
|
+
path: '*',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,MAAM,CAAC,MAAM,SAAS,GAAG,0BAA0B,CAAC;IAClD,YAAY,EAAE,YAAY;IAC1B,OAAO,EAAE;QACP,aAAa,EAAE;YACb,MAAM,EAAE,mBAAmB;YAC3B,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;gBACnC,WAAW,EAAG,KAAK,CAAC,MAA6B,EAAE,KAAK,IAAI,eAAe;gBAC3E,uFAAuF;gBACvF,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAG;aACnE,CAAC;SACH;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,kBAAkB;SAC3B;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE;gBACP,KAAK,EAAE,KAAK;aACb;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,GAAG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StaticParamList } from '@react-navigation/native'\nimport { createNativeStackNavigator } from '@react-navigation/native-stack'\nimport { NotFound } from '../screens/not_found'\nimport { ScreenLayout } from './screenLayout'\nimport { ConversationsScreen } from '../screens/conversations_screen'\nimport { ConversationScreen } from '../screens/conversation_screen'\nimport { HeaderBackButton } from '@react-navigation/elements'\n\nexport const ChatStack = createNativeStackNavigator({\n screenLayout: ScreenLayout,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Conversations',\n // This goes back on the parent so it doesn't automatically show up on the first screen\n headerLeft: () => <HeaderBackButton onPress={navigation.goBack} />,\n }),\n },\n Conversation: {\n screen: ConversationScreen,\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenLayout.d.ts","sourceRoot":"","sources":["../../src/navigation/screenLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAA;CAAE,qBAU1E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { QueryErrorResetBoundary } from '@tanstack/react-query';
|
|
3
|
+
import ErrorBoundary from '../components/error_boundary';
|
|
4
|
+
import { Suspense } from 'react';
|
|
5
|
+
import { Text } from '../components/display';
|
|
6
|
+
export function ScreenLayout({ children }) {
|
|
7
|
+
return (<QueryErrorResetBoundary>
|
|
8
|
+
{({ reset }) => (<ErrorBoundary onReset={reset}>
|
|
9
|
+
<Suspense fallback={<Text>loading...</Text>}>{children}</Suspense>
|
|
10
|
+
</ErrorBoundary>)}
|
|
11
|
+
</QueryErrorResetBoundary>);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=screenLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenLayout.js","sourceRoot":"","sources":["../../src/navigation/screenLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,aAAa,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAE5C,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAoC;IACzE,OAAO,CACL,CAAC,uBAAuB,CACtB;MAAA,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACd,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAC5B;UAAA,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,QAAQ,CACnE;QAAA,EAAE,aAAa,CAAC,CACjB,CACH;IAAA,EAAE,uBAAuB,CAAC,CAC3B,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport { QueryErrorResetBoundary } from '@tanstack/react-query'\nimport ErrorBoundary from '../components/error_boundary'\nimport { Suspense } from 'react'\nimport { Text } from '../components/display'\n\nexport function ScreenLayout({ children }: { children: React.ReactElement }) {\n return (\n <QueryErrorResetBoundary>\n {({ reset }) => (\n <ErrorBoundary onReset={reset}>\n <Suspense fallback={<Text>loading...</Text>}>{children}</Suspense>\n </ErrorBoundary>\n )}\n </QueryErrorResetBoundary>\n )\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type ConversationScreenProps = StaticScreenProps<{
|
|
4
|
+
conversation_id: string;
|
|
5
|
+
chat_group_graph_id: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function ConversationScreen({ route }: ConversationScreenProps): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=conversation_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;IACtD,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAC,CAAA;AAEF,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,uBAAuB,qBAMpE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { Text } from '../components/display';
|
|
4
|
+
export function ConversationScreen({ route }) {
|
|
5
|
+
return (<View style={styles.container}>
|
|
6
|
+
<Text>{JSON.stringify(route.params, null, 2)}</Text>
|
|
7
|
+
</View>);
|
|
8
|
+
}
|
|
9
|
+
const styles = StyleSheet.create({
|
|
10
|
+
container: {
|
|
11
|
+
flex: 1,
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
gap: 8,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=conversation_screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAO5C,MAAM,UAAU,kBAAkB,CAAC,EAAE,KAAK,EAA2B;IACnE,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CACrD;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,GAAG,EAAE,CAAC;KACP;CACF,CAAC,CAAA","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { Text } from '../components/display'\n\nexport type ConversationScreenProps = StaticScreenProps<{\n conversation_id: string\n chat_group_graph_id: string\n}>\n\nexport function ConversationScreen({ route }: ConversationScreenProps) {\n return (\n <View style={styles.container}>\n <Text>{JSON.stringify(route.params, null, 2)}</Text>\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n gap: 8,\n },\n})\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type ConversationScreenProps = StaticScreenProps<{
|
|
4
|
+
title?: string;
|
|
5
|
+
chat_group_graph_id?: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function ConversationsScreen(_props: ConversationScreenProps): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=conversations_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversations_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversations_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;IACtD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAC,CAAA;AAEF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,uBAAuB,qBAMlE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { Conversations } from '../components';
|
|
4
|
+
export function ConversationsScreen(_props) {
|
|
5
|
+
return (<View style={styles.container}>
|
|
6
|
+
<Conversations />
|
|
7
|
+
</View>);
|
|
8
|
+
}
|
|
9
|
+
const styles = StyleSheet.create({
|
|
10
|
+
container: {
|
|
11
|
+
flex: 1,
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
gap: 8,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=conversations_screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversations_screen.js","sourceRoot":"","sources":["../../src/screens/conversations_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAO7C,MAAM,UAAU,mBAAmB,CAAC,MAA+B;IACjE,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,aAAa,CAAC,AAAD,EAChB;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,GAAG,EAAE,CAAC;KACP;CACF,CAAC,CAAA","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { Conversations } from '../components'\n\nexport type ConversationScreenProps = StaticScreenProps<{\n title?: string\n chat_group_graph_id?: string\n}>\n\nexport function ConversationsScreen(_props: ConversationScreenProps) {\n return (\n <View style={styles.container}>\n <Conversations />\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n gap: 8,\n },\n})\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not_found.d.ts","sourceRoot":"","sources":["../../src/screens/not_found.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,wBAAgB,QAAQ,sBAOvB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Text } from '@react-navigation/elements';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
export function NotFound() {
|
|
5
|
+
return (<View style={styles.container}>
|
|
6
|
+
<Text>404</Text>
|
|
7
|
+
<Button screen="Conversations">Go to Home</Button>
|
|
8
|
+
</View>);
|
|
9
|
+
}
|
|
10
|
+
const styles = StyleSheet.create({
|
|
11
|
+
container: {
|
|
12
|
+
flex: 1,
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
gap: 10,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=not_found.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not_found.js","sourceRoot":"","sources":["../../src/screens/not_found.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE/C,MAAM,UAAU,QAAQ;IACtB,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CACf;MAAA,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,MAAM,CACnD;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,EAAE;KACR;CACF,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { Button, Text } from '@react-navigation/elements'\nimport { StyleSheet, View } from 'react-native'\n\nexport function NotFound() {\n return (\n <View style={styles.container}>\n <Text>404</Text>\n <Button screen=\"Conversations\">Go to Home</Button>\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n gap: 10,\n },\n})\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/chat-react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0-rc.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@planningcenter/icons": "^15.17.0",
|
|
24
24
|
"@react-navigation/elements": "*",
|
|
25
|
-
"@react-navigation/native": "
|
|
25
|
+
"@react-navigation/native": ">=7.0.0",
|
|
26
|
+
"@react-navigation/native-stack": ">=7.0.0",
|
|
26
27
|
"@tanstack/react-query": "^5.0.0",
|
|
27
28
|
"lodash": "*",
|
|
28
29
|
"react": "*",
|
|
@@ -39,5 +40,5 @@
|
|
|
39
40
|
"prettier": "^3.4.2",
|
|
40
41
|
"typescript": "<5.6.0"
|
|
41
42
|
},
|
|
42
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "e378fe4c1dcbe28813fc3374906968454d4c8796"
|
|
43
44
|
}
|
|
@@ -1,34 +1,14 @@
|
|
|
1
1
|
import { ConversationResource, JSONAPICollection } from '@planningcenter/chat-core'
|
|
2
2
|
import { useNavigation } from '@react-navigation/native'
|
|
3
|
-
import {
|
|
4
|
-
import React
|
|
3
|
+
import { useSuspenseQuery } from '@tanstack/react-query'
|
|
4
|
+
import React from 'react'
|
|
5
5
|
import { FlatList, Pressable, StyleSheet } from 'react-native'
|
|
6
|
-
import { ChatContext } from '../contexts/chat_context'
|
|
7
6
|
import { useTheme } from '../hooks'
|
|
8
7
|
import { Text } from './display'
|
|
9
|
-
import ErrorBoundary from './error_boundary'
|
|
10
8
|
|
|
11
9
|
type ConversationsResponse = JSONAPICollection<ConversationResource>
|
|
12
10
|
|
|
13
|
-
export
|
|
14
|
-
const { token } = useContext(ChatContext)
|
|
15
|
-
|
|
16
|
-
if (!token) return null
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<QueryErrorResetBoundary>
|
|
20
|
-
{({ reset }) => (
|
|
21
|
-
<ErrorBoundary onReset={reset}>
|
|
22
|
-
<Suspense fallback={<Text>loading...</Text>}>
|
|
23
|
-
<Loaded />
|
|
24
|
-
</Suspense>
|
|
25
|
-
</ErrorBoundary>
|
|
26
|
-
)}
|
|
27
|
-
</QueryErrorResetBoundary>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const Loaded = () => {
|
|
11
|
+
export const Conversations = () => {
|
|
32
12
|
const styles = useStyles()
|
|
33
13
|
const { data: conversations } = useSuspenseQuery<ConversationsResponse>({
|
|
34
14
|
queryKey: ['/chat/v2/me/conversations'],
|
|
@@ -43,7 +23,14 @@ const Loaded = () => {
|
|
|
43
23
|
ListEmptyComponent={<Text>No conversations found</Text>}
|
|
44
24
|
ListHeaderComponent={<Text style={styles.foo}>Conversations</Text>}
|
|
45
25
|
renderItem={({ item }) => (
|
|
46
|
-
<Pressable
|
|
26
|
+
<Pressable
|
|
27
|
+
onPress={() =>
|
|
28
|
+
navigation.navigate('Conversation', {
|
|
29
|
+
conversation_id: item.id,
|
|
30
|
+
chat_group_graph_id: item.id,
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
>
|
|
47
34
|
<Text style={styles.listItem}>{item.attributes.title}</Text>
|
|
48
35
|
</Pressable>
|
|
49
36
|
)}
|
package/src/index.tsx
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StaticParamList } from '@react-navigation/native'
|
|
3
|
+
import { createNativeStackNavigator } from '@react-navigation/native-stack'
|
|
4
|
+
import { NotFound } from '../screens/not_found'
|
|
5
|
+
import { ScreenLayout } from './screenLayout'
|
|
6
|
+
import { ConversationsScreen } from '../screens/conversations_screen'
|
|
7
|
+
import { ConversationScreen } from '../screens/conversation_screen'
|
|
8
|
+
import { HeaderBackButton } from '@react-navigation/elements'
|
|
9
|
+
|
|
10
|
+
export const ChatStack = createNativeStackNavigator({
|
|
11
|
+
screenLayout: ScreenLayout,
|
|
12
|
+
screens: {
|
|
13
|
+
Conversations: {
|
|
14
|
+
screen: ConversationsScreen,
|
|
15
|
+
options: ({ route, navigation }) => ({
|
|
16
|
+
headerTitle: (route.params as { title?: string })?.title ?? 'Conversations',
|
|
17
|
+
// This goes back on the parent so it doesn't automatically show up on the first screen
|
|
18
|
+
headerLeft: () => <HeaderBackButton onPress={navigation.goBack} />,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
Conversation: {
|
|
22
|
+
screen: ConversationScreen,
|
|
23
|
+
},
|
|
24
|
+
NotFound: {
|
|
25
|
+
screen: NotFound,
|
|
26
|
+
options: {
|
|
27
|
+
title: '404',
|
|
28
|
+
},
|
|
29
|
+
linking: {
|
|
30
|
+
path: '*',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
type ChatStackParamList = StaticParamList<typeof ChatStack>
|
|
37
|
+
|
|
38
|
+
declare global {
|
|
39
|
+
namespace ReactNavigation {
|
|
40
|
+
interface RootParamList extends ChatStackParamList {}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { QueryErrorResetBoundary } from '@tanstack/react-query'
|
|
3
|
+
import ErrorBoundary from '../components/error_boundary'
|
|
4
|
+
import { Suspense } from 'react'
|
|
5
|
+
import { Text } from '../components/display'
|
|
6
|
+
|
|
7
|
+
export function ScreenLayout({ children }: { children: React.ReactElement }) {
|
|
8
|
+
return (
|
|
9
|
+
<QueryErrorResetBoundary>
|
|
10
|
+
{({ reset }) => (
|
|
11
|
+
<ErrorBoundary onReset={reset}>
|
|
12
|
+
<Suspense fallback={<Text>loading...</Text>}>{children}</Suspense>
|
|
13
|
+
</ErrorBoundary>
|
|
14
|
+
)}
|
|
15
|
+
</QueryErrorResetBoundary>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StaticScreenProps } from '@react-navigation/native'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { StyleSheet, View } from 'react-native'
|
|
4
|
+
import { Text } from '../components/display'
|
|
5
|
+
|
|
6
|
+
export type ConversationScreenProps = StaticScreenProps<{
|
|
7
|
+
conversation_id: string
|
|
8
|
+
chat_group_graph_id: string
|
|
9
|
+
}>
|
|
10
|
+
|
|
11
|
+
export function ConversationScreen({ route }: ConversationScreenProps) {
|
|
12
|
+
return (
|
|
13
|
+
<View style={styles.container}>
|
|
14
|
+
<Text>{JSON.stringify(route.params, null, 2)}</Text>
|
|
15
|
+
</View>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const styles = StyleSheet.create({
|
|
20
|
+
container: {
|
|
21
|
+
flex: 1,
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
gap: 8,
|
|
24
|
+
},
|
|
25
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StaticScreenProps } from '@react-navigation/native'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { StyleSheet, View } from 'react-native'
|
|
4
|
+
import { Conversations } from '../components'
|
|
5
|
+
|
|
6
|
+
export type ConversationScreenProps = StaticScreenProps<{
|
|
7
|
+
title?: string
|
|
8
|
+
chat_group_graph_id?: string
|
|
9
|
+
}>
|
|
10
|
+
|
|
11
|
+
export function ConversationsScreen(_props: ConversationScreenProps) {
|
|
12
|
+
return (
|
|
13
|
+
<View style={styles.container}>
|
|
14
|
+
<Conversations />
|
|
15
|
+
</View>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const styles = StyleSheet.create({
|
|
20
|
+
container: {
|
|
21
|
+
flex: 1,
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
gap: 8,
|
|
24
|
+
},
|
|
25
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Button, Text } from '@react-navigation/elements'
|
|
3
|
+
import { StyleSheet, View } from 'react-native'
|
|
4
|
+
|
|
5
|
+
export function NotFound() {
|
|
6
|
+
return (
|
|
7
|
+
<View style={styles.container}>
|
|
8
|
+
<Text>404</Text>
|
|
9
|
+
<Button screen="Conversations">Go to Home</Button>
|
|
10
|
+
</View>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const styles = StyleSheet.create({
|
|
15
|
+
container: {
|
|
16
|
+
flex: 1,
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
gap: 10,
|
|
20
|
+
},
|
|
21
|
+
})
|