Fixed modal set to false when switching between history and bookmark tab

This commit is contained in:
2024-06-30 15:25:28 +08:00
parent 947bd474d1
commit 47d1867cab

View File

@@ -84,10 +84,16 @@ const HistoryScreen: React.FC = () => {
<View style={styles.container}>
{/* Header for toggling between History and Bookmarks */}
<View style={styles.headerContainer}>
<TouchableOpacity onPress={() => setShowBookmarks(false)}>
<TouchableOpacity onPress={() => {
setShowBookmarks(false);
clearSelectedData();
}}>
<Text style={!showBookmarks ? styles.headerTextActive : styles.headerTextInactive}>History</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => setShowBookmarks(true)}>
<TouchableOpacity onPress={() => {
setShowBookmarks(true);
clearSelectedData();
}}>
<Text style={showBookmarks ? styles.headerTextActive : styles.headerTextInactive}>Bookmarks</Text>
</TouchableOpacity>
</View>