import { useNavigation } from '@react-navigation/native'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import * as React from 'react'; import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import ArrowLeft from 'svg/ArrowLeft'; interface NavbarBackProps { title: string; } const NavbarBack = ({ title }: NavbarBackProps) => { const navigation = useNavigation>(); return ( navigation.goBack()}> {title} ); }; export default NavbarBack; const styles = StyleSheet.create({ headerWrap: { flex: 1 }, header: { flexDirection: 'row', alignItems: 'center', backgroundColor: '#28A7E8', height: 60, paddingHorizontal: 12, }, headerTitle: { color: '#fff', fontSize: 20, fontWeight: '600', marginLeft: 8, }, });