import React, { FunctionComponent, Component, ReactType } from "react" import { Route, Redirect, RouteProps } from "react-router" import { useLoggedIn } from "../hooks/useLoggedIn"; export interface PrivateRouteProps extends RouteProps { } export const PrivateRoute: FunctionComponent = ({component: Component, ...rest}) => { const loggedIn = useLoggedIn(); return ( loggedIn === true ? : } /> ) }