diff options
Diffstat (limited to 'src/app/(protected)/offices')
| -rw-r--r-- | src/app/(protected)/offices/[officeId].tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/app/(protected)/offices/[officeId].tsx b/src/app/(protected)/offices/[officeId].tsx index fbcd9f8..caedb05 100644 --- a/src/app/(protected)/offices/[officeId].tsx +++ b/src/app/(protected)/offices/[officeId].tsx @@ -45,7 +45,7 @@ export default function OfficeDetailScreen() { <Text style={styles.primaryButtonText}>Reintentar</Text> </Pressable> - <Link href="/(protected)/offices" asChild> + <Link href="/offices" asChild> <Pressable style={styles.secondaryButton}> <Text style={styles.primaryButtonText}>Volver</Text> </Pressable> @@ -55,12 +55,13 @@ export default function OfficeDetailScreen() { } const isFav = favoriteOfficeIdsSet.has(office.id); + const isAvailable = office.available ?? true; return ( <ScrollView contentContainerStyle={styles.container}> <View style={styles.content}> {/* HEADER */} - <Link href="/(protected)/offices" asChild> + <Link href="/offices" asChild> <Pressable> <Text style={styles.back}>← Volver a espacios</Text> </Pressable> @@ -90,16 +91,16 @@ export default function OfficeDetailScreen() { <View style={[ styles.badge, - office.available && styles.badgeActive, + isAvailable && styles.badgeActive, ]} > <Text style={[ styles.badgeText, - office.available && styles.badgeTextActive, + isAvailable && styles.badgeTextActive, ]} > - {office.available ? 'Disponible' : 'Ocupado'} + {isAvailable ? 'Disponible' : 'Ocupado'} </Text> </View> </View> @@ -321,4 +322,4 @@ const styles = StyleSheet.create({ padding: theme.spacing.md, borderRadius: theme.radius.md, }, -});
\ No newline at end of file +}); |