import React from 'react'; import { Redirect, Route, RouteProps } from 'react-router'; import { useStoreState } from '@/state/hooks'; export default ({ children, ...props }: Omit) => { const isAuthenticated = useStoreState((state) => !!state.user.data?.uuid); return ( isAuthenticated ? children : } /> ); };