diff --git a/src/components/OperatorList.tsx b/src/components/OperatorList.tsx new file mode 100644 index 0000000..e39107d --- /dev/null +++ b/src/components/OperatorList.tsx @@ -0,0 +1,37 @@ +import { FC, useEffect, useState } from "react"; +import { Dimensions, FlatList, Image, StyleSheet } from "react-native" + +type OperatorListProps = { + wallet: string; +}; + +const OperatorList: FC = props => { + const {wallet} = props; + const [operators, setOperators] = useState([] as string[]); + const { width, height } = Dimensions.get("window"); + + const getOperators = async () => { + //TODO: replace with HTTP get + setOperators(["https://ordinal-operators.s3.amazonaws.com/Alchemists/400/Autonomous_Esoteric_Alchemist.jpeg", "https://ordinal-operators.s3.amazonaws.com/Magicians/400/Unseen_Rogue_Magician.jpeg", "https://ordinal-operators.s3.amazonaws.com/Alchemists/400/Autonomous_Esoteric_Alchemist.jpeg", "https://ordinal-operators.s3.amazonaws.com/Magicians/400/Unseen_Rogue_Magician.jpeg", "https://ordinal-operators.s3.amazonaws.com/Alchemists/400/Autonomous_Esoteric_Alchemist.jpeg", "https://ordinal-operators.s3.amazonaws.com/Magicians/400/Unseen_Rogue_Magician.jpeg", "https://ordinal-operators.s3.amazonaws.com/Alchemists/400/Autonomous_Esoteric_Alchemist.jpeg", "https://ordinal-operators.s3.amazonaws.com/Magicians/400/Unseen_Rogue_Magician.jpeg", "https://ordinal-operators.s3.amazonaws.com/Alchemists/400/Autonomous_Esoteric_Alchemist.jpeg", "https://ordinal-operators.s3.amazonaws.com/Magicians/400/Unseen_Rogue_Magician.jpeg", "https://ordinal-operators.s3.amazonaws.com/Alchemists/400/Autonomous_Esoteric_Alchemist.jpeg", "https://ordinal-operators.s3.amazonaws.com/Magicians/400/Unseen_Rogue_Magician.jpeg"]) + } + + useEffect(() => { + getOperators(); + }, [wallet]); + + return ( + }/> + )}; + +const styles = StyleSheet.create({ + container: { + width: '100%', + marginVertical: 10, + }, + operatorImg: { + marginHorizontal: 'auto', + marginVertical: 10 + } +}); + +export default OperatorList; \ No newline at end of file diff --git a/src/components/steps/HomeScreen.tsx b/src/components/steps/HomeScreen.tsx index 1bb8eb7..11333a6 100644 --- a/src/components/steps/HomeScreen.tsx +++ b/src/components/steps/HomeScreen.tsx @@ -13,6 +13,7 @@ import SubMenuModal from "../SubMenuModal"; import IconButton from "../IconButton"; import Clipboard from "@react-native-clipboard/clipboard"; import Svg, { Circle, Defs, Mask, Rect } from "react-native-svg"; +import OperatorList from "../OperatorList"; enum HomeSteps { Home, @@ -112,7 +113,7 @@ const HomeScreen: FC = props => { return {step == HomeSteps.Home && - + My Operators @@ -125,7 +126,8 @@ const HomeScreen: FC = props => { setStep(HomeSteps.ScanCode)}/> - + + setReceiveVisible(false)}/> }