import React from 'react'; import { useNavigator } from '@idealyst/navigation'; import { Pressable } from '../Pressable'; import type { LinkProps } from './types'; import { Text } from 'react-native'; const Link: React.FC = ({ to, vars, children, disabled = false, style, testID, accessibilityLabel, onPress, id, }) => { const navigator = useNavigator(); const handlePress = () => { if (disabled) return; onPress?.(); navigator.navigate({ path: to, vars }); }; console.log("Rendering Link to:", to, "children:", children); return ( {typeof children === 'string' ? {children} : children} ); }; export default Link;