(Component)
| 12 | import { PrivateRoutes } from "./components/PrivateRoutes"; |
| 13 | |
| 14 | function wrapRouteWithFade(Component) { |
| 15 | return ({ match }) => ( |
| 16 | <CSSTransition |
| 17 | in={match != null} |
| 18 | timeout={300} |
| 19 | classNames="page-fade" |
| 20 | unmountOnExit |
| 21 | > |
| 22 | <Component /> |
| 23 | </CSSTransition> |
| 24 | ); |
| 25 | } |
| 26 | |
| 27 | export function AppRouter() { |
| 28 | const { user, setUser, isAuthenticated, isAuthReady, logOut } = useAuth(); |