TypeError: undefined is not an object (evaluating '_useFormikContext.handleSubmit')

Having problems with this.

import React from ‘react’;
import { useFormikContext } from ‘formik’;

import AppButton from ‘./AppButton’

function SubmitButton({ title }) {
const { handleSubmit } = useFormikContext();

return (
    <AppButton title={title} onPress={handleSubmit} />
);

}

export default SubmitButton;

import React from “react”;
import { StyleSheet, Text, TouchaleOpacity } from “react-native”;

import colors from “…/config/colors”;

function AppButton({ title, onPress, color = “primary” }) {
return (
<TouchaleOpacity style={[styles.button, { backgroundColor: colors[color] }]} onPress={onPress}>
{title}

)
}

const styles = StyleSheet.create({
button: {
backgroundColor: colors.primary,
borderRadius: 25,
justifyContent: “center”,
alignItems: “center”,
padding: 15,
marginVertical: 10,
},
text: {
color: colors.white,
fontSize: 18,
},
})