Guide4Screen.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. import * as WebBrowser from "expo-web-browser";
  2. import * as React from "react";
  3. import {
  4. Image,
  5. Platform,
  6. StyleSheet,
  7. TouchableOpacity,
  8. View,
  9. ImageBackground,
  10. } from "react-native";
  11. import scrollPage from "../decorator/scrollPage";
  12. import { useModel } from "flooks";
  13. import {
  14. Layout,
  15. Tab,
  16. TabView,
  17. Text,
  18. useTheme,
  19. Button,
  20. Card,
  21. } from "@ui-kitten/components";
  22. import FormInput from "../components/FormInput";
  23. import { useFocusEffect } from "@react-navigation/native";
  24. import ScrollPage from "../components/ScrollPage";
  25. import ConnectButton from "../components/ConnectButton";
  26. import GuideHeaderBar from "../components/GuideHeaderBar";
  27. import Textarea from "react-native-textarea";
  28. export default function Guide1Screen({ navigation, route }) {
  29. const theme = useTheme();
  30. const { changeBackground } = useModel("barModel");
  31. const { setNavigation, pushRouter } = useModel("routersModel", true);
  32. const { httpGet } = useModel("httpModel", true);
  33. const { saveMerchant, changeGuideStep } = useModel("userModel", true);
  34. const { guide4_title1, guide4_title2, complete } = useModel("wordsModel");
  35. useFocusEffect(
  36. React.useCallback(() => {
  37. changeBackground(theme["color-primary-500"]);
  38. setNavigation(navigation);
  39. }, [])
  40. );
  41. return (
  42. <>
  43. <GuideHeaderBar />
  44. <ScrollPage>
  45. <Layout style={styles.container}>
  46. <Card appearance='headFilled'>
  47. <Text category='s1'>{guide4_title1}</Text>
  48. <Text category='s1'>{guide4_title2}</Text>
  49. </Card>
  50. <Layout style={styles.layoutLeft} level='1'>
  51. <Button
  52. status='primary'
  53. onPress={() =>
  54. changeGuideStep(4,'StoreAudit')
  55. }
  56. >
  57. {complete}
  58. </Button>
  59. </Layout>
  60. <ConnectButton />
  61. </Layout>
  62. </ScrollPage>
  63. </>
  64. );
  65. }
  66. const styles = StyleSheet.create({
  67. container: {
  68. flex: 1,
  69. paddingBottom: 33,
  70. },
  71. tabContent: {
  72. backgroundColor: "#fff",
  73. marginTop: 20,
  74. },
  75. img: {
  76. width: 100,
  77. height: 100,
  78. alignSelf: "center",
  79. },
  80. img2: {
  81. width: 97,
  82. height: 21,
  83. alignSelf: "center",
  84. marginTop: 2,
  85. },
  86. text: {
  87. marginTop: 16,
  88. },
  89. layoutLeft: {
  90. // flexDirection: "row",
  91. paddingVertical: 10,
  92. justifyContent: "center",
  93. alignItems: "center",
  94. marginTop: 50,
  95. },
  96. form: {
  97. paddingHorizontal: 26,
  98. paddingVertical: 20,
  99. },
  100. textareaContainer: {
  101. backgroundColor: "#F0F0F0",
  102. height: 100,
  103. borderRadius: 4,
  104. },
  105. textarea: {
  106. textAlignVertical: "top", // hack android
  107. fontSize: 13,
  108. color: "#333",
  109. paddingHorizontal: 14,
  110. paddingVertical: 10,
  111. height: 100,
  112. },
  113. });