diff --git a/components/TitleBar.tsx b/components/TitleBar.tsx index d936cf8..8cbdcf8 100644 --- a/components/TitleBar.tsx +++ b/components/TitleBar.tsx @@ -2,13 +2,19 @@ import { StyleSheet, Text, View} from 'react-native'; import { AntDesign, Ionicons } from '@expo/vector-icons'; import { Link } from "react-router-native"; -export default function TitleBar({ title='', theme={} , showBack="", setShowBack, setTitle}:any){ +export default function TitleBar({ title='', theme={} , showBack="", setShowBack, setTitle }:any){ const st = style(theme); + + const handleBack = () =>{ + setTitle(showBack) + setShowBack("") + } + return ( - {showBack ? {setTitle(showBack);setShowBack("")}} to={`/${showBack}`}>{showBack} : null} + {showBack ? {showBack} : null} {title} - {showBack ? {showBack} : null} + {showBack ? {showBack} : null} ) }