react-native-srschat 0.1.39 → 0.1.41

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.
Files changed (50) hide show
  1. package/lib/commonjs/components/LoadingTips.js +105 -0
  2. package/lib/commonjs/components/LoadingTips.js.map +1 -0
  3. package/lib/commonjs/components/email.js +2 -2
  4. package/lib/commonjs/components/email.js.map +1 -1
  5. package/lib/commonjs/components/header.js +10 -7
  6. package/lib/commonjs/components/header.js.map +1 -1
  7. package/lib/commonjs/components/productCard.js +17 -2
  8. package/lib/commonjs/components/productCard.js.map +1 -1
  9. package/lib/commonjs/components/progressCircle.js +2 -1
  10. package/lib/commonjs/components/progressCircle.js.map +1 -1
  11. package/lib/commonjs/layout/icon.js +9 -5
  12. package/lib/commonjs/layout/icon.js.map +1 -1
  13. package/lib/commonjs/layout/welcome.js +9 -6
  14. package/lib/commonjs/layout/welcome.js.map +1 -1
  15. package/lib/commonjs/utils/cloudinary.js +62 -0
  16. package/lib/commonjs/utils/cloudinary.js.map +1 -0
  17. package/lib/module/components/LoadingTips.js +95 -0
  18. package/lib/module/components/LoadingTips.js.map +1 -0
  19. package/lib/module/components/email.js +2 -2
  20. package/lib/module/components/email.js.map +1 -1
  21. package/lib/module/components/header.js +10 -7
  22. package/lib/module/components/header.js.map +1 -1
  23. package/lib/module/components/productCard.js +18 -3
  24. package/lib/module/components/productCard.js.map +1 -1
  25. package/lib/module/components/progressCircle.js +2 -1
  26. package/lib/module/components/progressCircle.js.map +1 -1
  27. package/lib/module/layout/icon.js +8 -5
  28. package/lib/module/layout/icon.js.map +1 -1
  29. package/lib/module/layout/welcome.js +9 -6
  30. package/lib/module/layout/welcome.js.map +1 -1
  31. package/lib/module/utils/cloudinary.js +54 -0
  32. package/lib/module/utils/cloudinary.js.map +1 -0
  33. package/lib/typescript/components/LoadingTips.d.ts +3 -0
  34. package/lib/typescript/components/LoadingTips.d.ts.map +1 -0
  35. package/lib/typescript/components/header.d.ts.map +1 -1
  36. package/lib/typescript/components/productCard.d.ts.map +1 -1
  37. package/lib/typescript/components/progressCircle.d.ts.map +1 -1
  38. package/lib/typescript/layout/icon.d.ts.map +1 -1
  39. package/lib/typescript/layout/welcome.d.ts.map +1 -1
  40. package/lib/typescript/utils/cloudinary.d.ts +17 -0
  41. package/lib/typescript/utils/cloudinary.d.ts.map +1 -0
  42. package/package.json +3 -2
  43. package/src/components/LoadingTips.js +99 -0
  44. package/src/components/email.js +2 -2
  45. package/src/components/header.js +8 -3
  46. package/src/components/productCard.js +21 -2
  47. package/src/components/progressCircle.js +2 -0
  48. package/src/layout/icon.js +7 -3
  49. package/src/layout/welcome.js +7 -2
  50. package/src/utils/cloudinary.js +58 -0
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import { Cloudinary } from '@cloudinary/url-gen';
3
+ import { Platform, View } from 'react-native';
4
+ import { AdvancedImage } from 'cloudinary-react-native';
5
+ import { scale } from '@cloudinary/url-gen/actions/resize';
6
+ const CloudinaryImage = ({
7
+ cldImg,
8
+ imageStyle,
9
+ accessibilityLabel,
10
+ testID
11
+ }) => {
12
+ const cld = new Cloudinary({
13
+ cloud: {
14
+ cloudName: 'heritageplus'
15
+ }
16
+ });
17
+ const myImage = Platform.OS === 'ios' ? cld.image(`mobileapp/${cldImg}`) : cld.image(`mobileapp/${cldImg}`).format('png');
18
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(AdvancedImage, {
19
+ cldImg: myImage,
20
+ accessibilityLabel: accessibilityLabel,
21
+ testID: testID,
22
+ style: [{
23
+ resizeMode: 'contain'
24
+ }, imageStyle]
25
+ }));
26
+ };
27
+ export const CloudinaryBannerImage = ({
28
+ cldImg,
29
+ imageStyle,
30
+ accessibilityLabel,
31
+ testID,
32
+ width = 345,
33
+ height = 100
34
+ }) => {
35
+ const cld = new Cloudinary({
36
+ cloud: {
37
+ cloudName: 'heritageplus'
38
+ }
39
+ });
40
+ const myImage = cld.image(`${cldImg}`);
41
+ myImage.resize(scale().width(parseInt(width * 3)).height(parseInt(height * 3)));
42
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(AdvancedImage, {
43
+ cldImg: myImage,
44
+ accessibilityLabel: accessibilityLabel,
45
+ testID: testID,
46
+ style: [{
47
+ resizeMode: 'contain',
48
+ width: width,
49
+ height: height
50
+ }, imageStyle]
51
+ }));
52
+ };
53
+ export default CloudinaryImage;
54
+ //# sourceMappingURL=cloudinary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Cloudinary","Platform","View","AdvancedImage","scale","CloudinaryImage","cldImg","imageStyle","accessibilityLabel","testID","cld","cloud","cloudName","myImage","OS","image","format","createElement","style","resizeMode","CloudinaryBannerImage","width","height","resize","parseInt"],"sourceRoot":"../../../src","sources":["utils/cloudinary.js"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,KAAK,QAAQ,oCAAoC;AAE1D,MAAMC,eAAe,GAAGA,CAAC;EAAEC,MAAM;EAAEC,UAAU;EAAEC,kBAAkB;EAAEC;AAAO,CAAC,KAAK;EAC9E,MAAMC,GAAG,GAAG,IAAIV,UAAU,CAAC;IACzBW,KAAK,EAAE;MACLC,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EAEF,MAAMC,OAAO,GAAGZ,QAAQ,CAACa,EAAE,KAAK,KAAK,GAAGJ,GAAG,CAACK,KAAK,CAAC,aAAaT,MAAM,EAAE,CAAC,GAAGI,GAAG,CAACK,KAAK,CAAC,aAAaT,MAAM,EAAE,CAAC,CAACU,MAAM,CAAC,KAAK,CAAC;EACzH,oBACEjB,KAAA,CAAAkB,aAAA,CAACf,IAAI,qBACHH,KAAA,CAAAkB,aAAA,CAACd,aAAa;IACZG,MAAM,EAAEO,OAAQ;IAChBL,kBAAkB,EAAEA,kBAAmB;IACvCC,MAAM,EAAEA,MAAO;IACfS,KAAK,EAAE,CAAC;MAAEC,UAAU,EAAE;IAAU,CAAC,EAAEZ,UAAU;EAAE,CAChD,CACG,CAAC;AAEX,CAAC;AAED,OAAO,MAAMa,qBAAqB,GAAGA,CAAC;EACpCd,MAAM;EACNC,UAAU;EACVC,kBAAkB;EAClBC,MAAM;EACNY,KAAK,GAAG,GAAG;EACXC,MAAM,GAAG;AACX,CAAC,KAAK;EACJ,MAAMZ,GAAG,GAAG,IAAIV,UAAU,CAAC;IACzBW,KAAK,EAAE;MACLC,SAAS,EAAE;IACb;EACF,CAAC,CAAC;EACF,MAAMC,OAAO,GAAGH,GAAG,CAACK,KAAK,CAAC,GAAGT,MAAM,EAAE,CAAC;EACtCO,OAAO,CAACU,MAAM,CACZnB,KAAK,CAAC,CAAC,CACJiB,KAAK,CAACG,QAAQ,CAACH,KAAK,GAAG,CAAC,CAAC,CAAC,CAC1BC,MAAM,CAACE,QAAQ,CAACF,MAAM,GAAG,CAAC,CAAC,CAChC,CAAC;EACD,oBACEvB,KAAA,CAAAkB,aAAA,CAACf,IAAI,qBACHH,KAAA,CAAAkB,aAAA,CAACd,aAAa;IACZG,MAAM,EAAEO,OAAQ;IAChBL,kBAAkB,EAAEA,kBAAmB;IACvCC,MAAM,EAAEA,MAAO;IACfS,KAAK,EAAE,CAAC;MAAEC,UAAU,EAAE,SAAS;MAAEE,KAAK,EAAEA,KAAK;MAAEC,MAAM,EAAEA;IAAO,CAAC,EAAEf,UAAU;EAAE,CAC9E,CACG,CAAC;AAEX,CAAC;AAED,eAAeF,eAAe","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export function LoadingTips(): React.JSX.Element;
2
+ import React from 'react';
3
+ //# sourceMappingURL=LoadingTips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingTips.d.ts","sourceRoot":"","sources":["../../../src/components/LoadingTips.js"],"names":[],"mappings":"AAmBO,iDAyDN;kBA5EkD,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/header.js"],"names":[],"mappings":"AAOO,4CAwDN;kBA/DiC,OAAO"}
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/header.js"],"names":[],"mappings":"AAQO,4CA4DN;kBApEiC,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"productCard.d.ts","sourceRoot":"","sources":["../../../src/components/productCard.js"],"names":[],"mappings":"AAKO;;;sBAsPN;kBA3PsD,OAAO"}
1
+ {"version":3,"file":"productCard.d.ts","sourceRoot":"","sources":["../../../src/components/productCard.js"],"names":[],"mappings":"AAKO;;;sBAyQN;kBA9QsD,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"progressCircle.d.ts","sourceRoot":"","sources":["../../../src/components/progressCircle.js"],"names":[],"mappings":"AAIO,oDAiCN;kBArCoD,OAAO"}
1
+ {"version":3,"file":"progressCircle.d.ts","sourceRoot":"","sources":["../../../src/components/progressCircle.js"],"names":[],"mappings":"AAKO,oDAkCN;kBAvCoD,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/layout/icon.js"],"names":[],"mappings":"AAMO,8CA4CN;kBAlDiC,OAAO"}
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/layout/icon.js"],"names":[],"mappings":"AAMO,8CAgDN;kBAtDiC,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"welcome.d.ts","sourceRoot":"","sources":["../../../src/layout/welcome.js"],"names":[],"mappings":"AAWO;;sBAqDN;kBA/DiC,OAAO"}
1
+ {"version":3,"file":"welcome.d.ts","sourceRoot":"","sources":["../../../src/layout/welcome.js"],"names":[],"mappings":"AAYO;;sBAyDN;kBApEiC,OAAO"}
@@ -0,0 +1,17 @@
1
+ export function CloudinaryBannerImage({ cldImg, imageStyle, accessibilityLabel, testID, width, height }: {
2
+ cldImg: any;
3
+ imageStyle: any;
4
+ accessibilityLabel: any;
5
+ testID: any;
6
+ width?: number | undefined;
7
+ height?: number | undefined;
8
+ }): React.JSX.Element;
9
+ export default CloudinaryImage;
10
+ import React from 'react';
11
+ declare function CloudinaryImage({ cldImg, imageStyle, accessibilityLabel, testID }: {
12
+ cldImg: any;
13
+ imageStyle: any;
14
+ accessibilityLabel: any;
15
+ testID: any;
16
+ }): React.JSX.Element;
17
+ //# sourceMappingURL=cloudinary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudinary.d.ts","sourceRoot":"","sources":["../../../src/utils/cloudinary.js"],"names":[],"mappings":"AA0BO;;;;;;;sBA6BN;;kBAvDiB,OAAO;AAMzB;;;;;sBAkBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-srschat",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "private": false,
5
5
  "description": "A modern, sophisticated chat interface for React Native",
6
6
  "main": "lib/commonjs/index",
@@ -75,7 +75,8 @@
75
75
  "react-native-uuid": "^2.0.3",
76
76
  "react-native-vector-icons": "^10.2.0",
77
77
  "react-native-video": "^6.10.2",
78
- "react-native-web": "~0.19.10"
78
+ "react-native-web": "~0.19.10",
79
+ "cloudinary-react-native": "^0.3.0"
79
80
  },
80
81
  "react-native-builder-bob": {
81
82
  "source": "src",
@@ -0,0 +1,99 @@
1
+ import React, { useState, useEffect, useRef } from 'react';
2
+ import { View, Text, StyleSheet, Animated } from 'react-native';
3
+ import Ionicons from 'react-native-vector-icons/Ionicons';
4
+
5
+ const tips = [
6
+ {
7
+ text: 'Use 👍👎 next to each response to help us improve Poseidon',
8
+ icon: ''
9
+ },
10
+ {
11
+ text: 'Use 🗑️ to clear current chat history and dismiss chat window',
12
+ icon: ''
13
+ },
14
+ {
15
+ text: 'Use 📧 to send any questions to the current branch support',
16
+ icon: ''
17
+ }
18
+ ];
19
+
20
+ export const LoadingTips = () => {
21
+ const [currentTip, setCurrentTip] = useState(0);
22
+ const fadeAnim = useRef(new Animated.Value(1)).current;
23
+ const jumpAnim = useRef(new Animated.Value(0)).current;
24
+
25
+ useEffect(() => {
26
+ // Fade in/out for tip changes
27
+ const tipInterval = setInterval(() => {
28
+ // Fade out
29
+ Animated.timing(fadeAnim, {
30
+ toValue: 0,
31
+ duration: 500,
32
+ useNativeDriver: true,
33
+ }).start(() => {
34
+ // Change tip and fade in
35
+ setCurrentTip(prev => (prev + 1) % tips.length);
36
+ Animated.timing(fadeAnim, {
37
+ toValue: 1,
38
+ duration: 500,
39
+ useNativeDriver: true,
40
+ }).start();
41
+ });
42
+ }, 4000);
43
+
44
+ // Jump animation
45
+ const jumpInterval = setInterval(() => {
46
+ Animated.sequence([
47
+ Animated.timing(jumpAnim, {
48
+ toValue: -5,
49
+ duration: 250,
50
+ useNativeDriver: true,
51
+ }),
52
+ Animated.timing(jumpAnim, {
53
+ toValue: 0,
54
+ duration: 250,
55
+ useNativeDriver: true,
56
+ })
57
+ ]).start();
58
+ }, 2000);
59
+
60
+ return () => {
61
+ clearInterval(tipInterval);
62
+ clearInterval(jumpInterval);
63
+ };
64
+ }, []);
65
+
66
+ return (
67
+ <Animated.View style={[styles.container, { opacity: fadeAnim }]}>
68
+ <Animated.View style={{ transform: [{ translateY: jumpAnim }] }}>
69
+ <Ionicons name="bulb-outline" size={16} color="#367CB6" />
70
+ </Animated.View>
71
+ <Text style={styles.tipText}>
72
+ <Text style={styles.tipIcon}>{tips[currentTip].icon} </Text>
73
+ {tips[currentTip].text}
74
+ </Text>
75
+ </Animated.View>
76
+ );
77
+ };
78
+
79
+ const styles = StyleSheet.create({
80
+ container: {
81
+ flexDirection: 'row',
82
+ alignItems: 'center',
83
+ padding: 10,
84
+ marginLeft: 15,
85
+ borderRadius: 8,
86
+ marginBottom: 8,
87
+ flex: 1,
88
+ },
89
+ tipText: {
90
+ marginLeft: 8,
91
+ fontSize: 14,
92
+ color: '#303030',
93
+ flexShrink: 1,
94
+ },
95
+ tipIcon: {
96
+ marginRight: 5,
97
+ fontSize: 16,
98
+ }
99
+ });
@@ -157,7 +157,7 @@ const styles = StyleSheet.create({
157
157
  marginBottom: 20,
158
158
  },
159
159
  input: {
160
- backgroundColor: "#f5f5f5",
160
+ backgroundColor: "white",
161
161
  borderRadius: 8,
162
162
  padding: 12,
163
163
  fontSize: 16,
@@ -166,7 +166,7 @@ const styles = StyleSheet.create({
166
166
  marginBottom: 10,
167
167
  },
168
168
  textArea: {
169
- backgroundColor: "#f5f5f5",
169
+ backgroundColor: "white",
170
170
  borderRadius: 8,
171
171
  padding: 12,
172
172
  fontSize: 16,
@@ -3,6 +3,7 @@ import { View, Text, TouchableOpacity, StyleSheet, Image } from 'react-native';
3
3
  import { AppContext } from '../contexts/AppContext';
4
4
  import Ionicons from 'react-native-vector-icons/Ionicons';
5
5
  import { SvgCssUri } from 'react-native-svg/css';
6
+ import CloudinaryImage from '../utils/cloudinary';
6
7
  // import { PoseidonLogo } from './PoseidonLogo';
7
8
 
8
9
  export const Header = () => {
@@ -26,10 +27,14 @@ export const Header = () => {
26
27
  <View style={styles.section}>
27
28
  {/* <PoseidonLogo width={150} height={35} color="white" /> */}
28
29
  {/* <Image source={require('../assets/heritage.png')} style={[styles.logo, { tintColor: "white" }]} /> */}
29
- <SvgCssUri
30
+ {/* <SvgCssUri
30
31
  uri="https://media.heritageplus.com/image/upload/v1743632330/MobileApp/posiden.svg"
31
32
  width={150}
32
33
  height={35}
34
+ /> */}
35
+ <CloudinaryImage
36
+ cldImg="posiden"
37
+ imageStyle={{ width: 150, height: 35 }}
33
38
  />
34
39
  </View>
35
40
 
@@ -51,12 +56,12 @@ export const Header = () => {
51
56
  <Ionicons name="mail" size={24} color="white" />
52
57
  </TouchableOpacity>
53
58
  <TouchableOpacity onPress={() => handleClearState()}>
54
- <Ionicons name="trash" size={24} color="white" />
59
+ <Ionicons name="trash" size={22} color="white" />
55
60
  </TouchableOpacity>
56
61
  </>
57
62
  }
58
63
  <TouchableOpacity onPress={() => handleClick()}>
59
- <Ionicons name="chevron-down" size={24} color="white" />
64
+ <Ionicons name="close" size={26} color="white" />
60
65
  </TouchableOpacity>
61
66
  </View>
62
67
  </View>
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useContext, useEffect } from "react";
2
- import { View, Text, Image, TouchableOpacity, TextInput, StyleSheet, Platform, Keyboard, ActionSheetIOS } from "react-native";
2
+ import { View, Text, Image, TouchableOpacity, TextInput, StyleSheet, Platform, Keyboard, ActionSheetIOS, Alert } from "react-native";
3
3
  import { AppContext } from "../contexts/AppContext";
4
4
  import Ionicons from 'react-native-vector-icons/Ionicons';
5
5
 
@@ -112,6 +112,25 @@ export const ProductCard = ({ prod, onFocusQuantityInput }) => {
112
112
  }
113
113
  }
114
114
  );
115
+ } else if (Platform.OS === 'android') {
116
+ // Android implementation
117
+ const buttons = uoms.map(uom => ({
118
+ text: uom,
119
+ onPress: () => handleUomChange(uom)
120
+ }));
121
+
122
+ // Add cancel button
123
+ buttons.push({
124
+ text: 'Cancel',
125
+ style: 'cancel'
126
+ });
127
+
128
+ Alert.alert(
129
+ 'Select Unit',
130
+ '',
131
+ buttons,
132
+ { cancelable: true }
133
+ );
115
134
  }
116
135
  };
117
136
 
@@ -182,7 +201,7 @@ export const ProductCard = ({ prod, onFocusQuantityInput }) => {
182
201
  disabled={!valid}
183
202
  >
184
203
  <Text style={styles.dropdownButtonText}>{selectedUom}</Text>
185
- <Ionicons name="chevron-down" size={16} color="rgba(0, 0, 0, 0.6)" />
204
+ <Ionicons name="close" size={26} color="rgba(0, 0, 0, 0.6)" />
186
205
  </TouchableOpacity>
187
206
  </View>
188
207
  ) : null}
@@ -1,6 +1,7 @@
1
1
  import React, { useEffect, useRef, useContext } from "react";
2
2
  import { View, Animated, StyleSheet, Pressable, Text } from "react-native";
3
3
  import { AppContext } from "../contexts/AppContext";
4
+ import { LoadingTips } from "./LoadingTips";
4
5
 
5
6
  export const ProgressCircle = () => {
6
7
  const { stopGenerating } = useContext(AppContext);
@@ -28,6 +29,7 @@ export const ProgressCircle = () => {
28
29
  <>
29
30
  <Text style={styles.textBeta}>Beta version. Poseidon is learning!</Text>
30
31
  <View style={styles.container}>
32
+ <LoadingTips />
31
33
  <Pressable style={styles.circleContainer} onPress={stopGenerating}>
32
34
  <Animated.View style={[styles.circle, { transform: [{ rotate: spin }] }]} />
33
35
  <View style={styles.stopSquare} />
@@ -2,8 +2,8 @@ import React, { useContext } from 'react';
2
2
  import { TouchableOpacity, View, StyleSheet, Text } from 'react-native';
3
3
  import { AppContext } from '../contexts/AppContext';
4
4
  import Ionicons from 'react-native-vector-icons/Ionicons';
5
- import { SvgCssUri } from 'react-native-svg/css';
6
-
5
+ // import { SvgCssUri } from 'react-native-svg/css';
6
+ import CloudinaryImage from '../utils/cloudinary';
7
7
  export const ChatIcon = () => {
8
8
  const { setShowModal, messages, maintenance, disclaimer, uiConfig } = useContext(AppContext);
9
9
 
@@ -37,10 +37,14 @@ export const ChatIcon = () => {
37
37
  return (
38
38
  <TouchableOpacity style={containerStyle} onPress={handleClick} activeOpacity={0.7}>
39
39
  <View style={styles.iconContent}>
40
- <SvgCssUri
40
+ {/* <SvgCssUri
41
41
  uri = "https://media.heritageplus.com/image/upload/v1743096853/MobileApp/chat-icon-mobile.svg"
42
42
  width = {44}
43
43
  height = {44}
44
+ /> */}
45
+ <CloudinaryImage
46
+ cldImg="chat-icon-mobile"
47
+ imageStyle={{ width: 44, height: 44 }}
44
48
  />
45
49
  {iconType === 'tab' && (
46
50
  <Text style={styles.tabText}>Chat with Heritage</Text>
@@ -7,6 +7,7 @@ import { WelcomeInput } from '../components/welcomeInput';
7
7
  import ButtonComponent from '../components/welcomeButton';
8
8
  import { Testing } from '../components/testing';
9
9
  import { SvgCssUri } from 'react-native-svg/css';
10
+ import CloudinaryImage from '../utils/cloudinary';
10
11
  // import { PoseidonLogo } from '../components/PoseidonLogo';
11
12
 
12
13
  export const Welcome = ({ panHandlers }) => {
@@ -33,13 +34,17 @@ export const Welcome = ({ panHandlers }) => {
33
34
  <View style={styles.topContainer}>
34
35
  <View style={styles.topHeader}>
35
36
  {/* <PoseidonLogo width={150} height={35} color="white" /> */}
36
- <SvgCssUri
37
+ {/* <SvgCssUri
37
38
  uri="https://media.heritageplus.com/image/upload/v1743632330/MobileApp/posiden.svg"
38
39
  width={150}
39
40
  height={35}
41
+ /> */}
42
+ <CloudinaryImage
43
+ cldImg="posiden"
44
+ imageStyle={{ width: 150, height: 35 }}
40
45
  />
41
46
  <TouchableOpacity onPress={() => handleClick()} style={styles.collapseButton}>
42
- <Ionicons name="chevron-down" size={24} color="white" />
47
+ <Ionicons name="close" size={26} color="white" />
43
48
  </TouchableOpacity>
44
49
  </View>
45
50
 
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import { Cloudinary } from '@cloudinary/url-gen';
3
+ import { Platform, View } from 'react-native';
4
+ import { AdvancedImage } from 'cloudinary-react-native';
5
+ import { scale } from '@cloudinary/url-gen/actions/resize';
6
+
7
+ const CloudinaryImage = ({ cldImg, imageStyle, accessibilityLabel, testID }) => {
8
+ const cld = new Cloudinary({
9
+ cloud: {
10
+ cloudName: 'heritageplus'
11
+ }
12
+ });
13
+
14
+ const myImage = Platform.OS === 'ios' ? cld.image(`mobileapp/${cldImg}`) : cld.image(`mobileapp/${cldImg}`).format('png');
15
+ return (
16
+ <View>
17
+ <AdvancedImage
18
+ cldImg={myImage}
19
+ accessibilityLabel={accessibilityLabel}
20
+ testID={testID}
21
+ style={[{ resizeMode: 'contain' }, imageStyle]}
22
+ />
23
+ </View>
24
+ );
25
+ };
26
+
27
+ export const CloudinaryBannerImage = ({
28
+ cldImg,
29
+ imageStyle,
30
+ accessibilityLabel,
31
+ testID,
32
+ width = 345,
33
+ height = 100
34
+ }) => {
35
+ const cld = new Cloudinary({
36
+ cloud: {
37
+ cloudName: 'heritageplus'
38
+ }
39
+ });
40
+ const myImage = cld.image(`${cldImg}`);
41
+ myImage.resize(
42
+ scale()
43
+ .width(parseInt(width * 3))
44
+ .height(parseInt(height * 3))
45
+ );
46
+ return (
47
+ <View>
48
+ <AdvancedImage
49
+ cldImg={myImage}
50
+ accessibilityLabel={accessibilityLabel}
51
+ testID={testID}
52
+ style={[{ resizeMode: 'contain', width: width, height: height }, imageStyle]}
53
+ />
54
+ </View>
55
+ );
56
+ };
57
+
58
+ export default CloudinaryImage;