How do I know if the component the user being navigated to has state navigate('