Fix B2BScreen: remove duplicate header, move add button next to search

This commit is contained in:
2026-01-17 03:55:49 +03:00
parent ca3c9c667c
commit 401eb5dade
2 changed files with 23 additions and 45 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ const HomeStackNavigator: React.FC = () => {
<Stack.Screen name="WalletSetup" component={WalletSetupScreen} options={{ headerTitle: 'Cîzdan Saz Bike' }} />
<Stack.Screen name="Swap" component={SwapScreen} options={{ headerTitle: 'Swap' }} />
<Stack.Screen name="P2P" component={P2PScreen} options={{ headerTitle: 'P2P Bazirganî' }} />
<Stack.Screen name="B2B" component={B2BScreen} options={{ headerTitle: 'B2B Bazara' }} />
<Stack.Screen name="B2B" component={B2BScreen} options={{ headerTitle: 'B2B Bazirganî' }} />
<Stack.Screen name="TaxZekat" component={TaxZekatScreen} options={{ headerTitle: 'Bac & Zekat' }} />
<Stack.Screen name="Launchpad" component={LaunchpadScreen} options={{ headerTitle: 'Launchpad' }} />
<Stack.Screen name="President" component={PresidentScreen} options={{ headerTitle: 'Serok' }} />
+22 -44
View File
@@ -437,27 +437,7 @@ const B2BScreen: React.FC = () => {
<View style={styles.container}>
<StatusBar barStyle="dark-content" />
{/* Action Bar */}
<View style={styles.header}>
<View>
<Text style={styles.headerTitle}>B2B Bazirganî</Text>
<Text style={styles.headerSubtitle}>Kurdish Business Marketplace</Text>
</View>
<TouchableOpacity
style={styles.addButton}
onPress={() => {
if (!selectedAccount) {
Alert.alert('Şaşî / Error', 'Ji kerema xwe berê wallet ve girêbidin / Please connect wallet first');
return;
}
setShowCreateModal(true);
}}
>
<Text style={styles.addButtonText}>+ Îlan</Text>
</TouchableOpacity>
</View>
{/* Search */}
{/* Search + Add Button Row */}
<View style={styles.searchContainer}>
<View style={styles.searchBar}>
<Text style={styles.searchIcon}>🔍</Text>
@@ -474,6 +454,18 @@ const B2BScreen: React.FC = () => {
</TouchableOpacity>
)}
</View>
<TouchableOpacity
style={styles.addButton}
onPress={() => {
if (!selectedAccount) {
Alert.alert('Şaşî / Error', 'Ji kerema xwe berê wallet ve girêbidin / Please connect wallet first');
return;
}
setShowCreateModal(true);
}}
>
<Text style={styles.addButtonText}>+ Îlan</Text>
</TouchableOpacity>
</View>
{/* Categories */}
@@ -836,31 +828,13 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: '#F5F5F5',
},
header: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
backgroundColor: KurdistanColors.spi,
paddingHorizontal: 16,
paddingVertical: 12,
borderBottomWidth: 1,
borderBottomColor: '#E0E0E0',
},
headerTitle: {
fontSize: 20,
fontWeight: 'bold',
color: KurdistanColors.reş,
},
headerSubtitle: {
fontSize: 12,
color: '#666',
textAlign: 'center',
},
addButton: {
backgroundColor: KurdistanColors.kesk,
paddingHorizontal: 12,
paddingVertical: 8,
borderRadius: 8,
paddingHorizontal: 16,
height: 48,
borderRadius: 12,
justifyContent: 'center',
alignItems: 'center',
},
addButtonText: {
color: KurdistanColors.spi,
@@ -868,10 +842,14 @@ const styles = StyleSheet.create({
fontSize: 14,
},
searchContainer: {
flexDirection: 'row',
alignItems: 'center',
padding: 16,
backgroundColor: KurdistanColors.spi,
gap: 12,
},
searchBar: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
backgroundColor: '#F8F9FA',