Skip to content

Commit

Permalink
fix breadcrumb
Browse files Browse the repository at this point in the history
  • Loading branch information
taronaleksanian committed Oct 21, 2024
1 parent 4a08328 commit ba228ae
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/app/modules/item/screens/ItemDetailsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@ export function ItemDetailsScreen() {
<RStack style={{ padding: 10, width: '100%', paddingBottom: 50 }}>
<RStack style={styles.breadcrumbContainer}>
{Platform.OS === 'web' ? (
<RLink to="/items">
<RText style={styles.breadcrumbLink}>Items</RText>
<RLink to="/products">
<RText style={styles.breadcrumbLink}>Products</RText>
</RLink>
) : (
<TouchableOpacity onPress={() => router.push('/items')}>
<RText style={styles.breadcrumbLink}>Items</RText>
<TouchableOpacity onPress={() => router.push('/products')}>
<RText style={styles.breadcrumbLink}>Products</RText>
</TouchableOpacity>
)}

<RText style={styles.breadcrumbSeparator}>/</RText>

{Platform.OS === 'web' ? (
<RLink to={`/items`}>
<RLink to={`/products`}>
<RText style={styles.breadcrumbLink}>
{item?.category?.name}
</RText>
</RLink>
) : (
<TouchableOpacity onPress={() => router.push('/items')}>
<TouchableOpacity onPress={() => router.push('/products')}>
<RText style={styles.breadcrumbLink}>
{item?.category?.name}
</RText>
Expand Down Expand Up @@ -92,12 +92,14 @@ const loadStyles = (theme) => {
alignItems: 'center',
backgroundColor: currentTheme.colors.border,
padding: 8,
paddingLeft: 16,
borderRadius: 20,
marginBottom: 10,
gap: 4,
},
breadcrumbLink: {
color: currentTheme.colors.text,
fontSize: 18,
fontSize: 14,
fontWeight: 'bold',
},
breadcrumbSeparator: {
Expand Down

0 comments on commit ba228ae

Please sign in to comment.