BankScreen.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import * as WebBrowser from "expo-web-browser";
  2. import * as React from "react";
  3. import { StyleSheet } from "react-native";
  4. import { useModel } from "flooks";
  5. import {
  6. Layout,
  7. TopNavigationAction,
  8. Icon,
  9. } from "@ui-kitten/components";
  10. import NavHeaderBar from "../components/NavHeaderBar";
  11. import ListComponent from "../components/ListComponent";
  12. const styles = StyleSheet.create({
  13. list: {
  14. flex: 1,
  15. backgroundColor: "#EEEEEE",
  16. paddingVertical: 7,
  17. },
  18. separatorStyle: {
  19. height: 6,
  20. },
  21. });
  22. const PlusIcon = props => <Icon {...props} fill='#fff' name='plus' />;
  23. export default function BankScreen({ navigation }) {
  24. const { userTitle62 } = useModel("wordsModel");
  25. function getList() {
  26. return Promise.resolve();
  27. }
  28. const renderItem = ({ index }) => <Layout key={index} />;
  29. const renderRightActions = () => (
  30. <TopNavigationAction
  31. icon={PlusIcon}
  32. onPress={() => {
  33. navigation.navigat("AddBank");
  34. }}
  35. />
  36. );
  37. return (
  38. <>
  39. <NavHeaderBar
  40. title={userTitle62}
  41. accessoryRight={renderRightActions}
  42. />
  43. <ListComponent
  44. getInfo={getList}
  45. renderItem={renderItem}
  46. style={styles.list}
  47. separatorStyle={styles.separatorStyle}
  48. />
  49. </>
  50. );
  51. }