import { Route, Redirect } from "react-router-dom";

export const ProtectedComponent: React.FC<any> = ({ children, ...props }) => {
  console.log(props)
  return (
    <Route>
      {() => (props.currentCard ? children : <Redirect to="/" />)}
    </Route>
  )
}