import React from 'react'; import { View, Text, TouchableOpacity } from 'react-native'; import { useNavigation, useRoute } from '@react-navigation/native'; interface SidebarNavProps { items: { href: string; title: string; }[]; } export function SidebarNav({ items }: SidebarNavProps) { const navigation = useNavigation(); const route = useRoute(); return ( {items.map((item) => ( navigation.navigate(item.href)} style={{ padding: 8, backgroundColor: route.name === item.href ? '#f0f0f0' : 'transparent', borderRadius: 4, }} > {item.title} ))} ); }