import React from 'react'
import { StyleSheet, Text } from 'react-native'
const useLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : () => {}
function NoSSR({ children }: { children: React.ReactNode }) {
const [render, setRender] = React.useState(false)
React.useEffect(() => {
setRender(true)
}, [])
if (!render) {
return null
}
return <>{children}>
}
/** Default screen for unmatched routes. */
export function Unmatched() {
return unmmatched!!!!!!!!!
// const router = useRouter()
// const navigation = useNavigation()
// const pathname = usePathname()
// const url = createURL(pathname)
// useLayoutEffect(() => {
// navigation.setOptions({
// title: 'Not Found',
// })
// }, [navigation])
// return (
//
//
// Unmatched Route
//
//
// Page could not be found.{' '}
// {
// if (router.canGoBack()) {
// router.back()
// } else {
// router.replace('/')
// }
// }}
// style={styles.link}
// >
// Go back.
//
//
//
//
// {url}
//
//
//
// Sitemap
//
//
// )
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'black',
padding: 24,
alignItems: 'center',
justifyContent: 'center',
},
title: {
color: 'white',
fontSize: 36,
paddingBottom: 12,
marginBottom: 12,
borderBottomColor: '#323232',
borderBottomWidth: 1,
textAlign: 'center',
fontWeight: 'bold',
},
subtitle: {
color: 'white',
fontSize: 18,
marginBottom: 12,
textAlign: 'center',
},
link: { color: 'rgba(255,255,255,0.4)', textAlign: 'center' },
})