diff --git a/src/components/SubmitButton.tsx b/src/components/SubmitButton.tsx index f5e80dd..0d4bb5a 100644 --- a/src/components/SubmitButton.tsx +++ b/src/components/SubmitButton.tsx @@ -3,7 +3,7 @@ import { TouchableOpacity, Text, StyleSheet } from "react-native"; import { SubmitButtonProps } from "../types/types"; import { FramesConsumer } from "../Frames"; -const SubmitButton: React.FunctionComponent = (props) => { +const SubmitButton: React.FunctionComponent = (props: any) => { return ( {({ submitCard }) => { @@ -18,7 +18,7 @@ const SubmitButton: React.FunctionComponent = (props) => { {...touchableProps} style={[styles.buttonContainer, touchableProps.style]} onPress={(e) => { - submitCard(); + props.allowCharge && submitCard(); if (props.onPress) props.onPress(e); }} >