MCPcopy Create free account
hub / github.com/dfinity/cancan / wrapRouteWithFade

Function wrapRouteWithFade

src/AppRouter.tsx:14–25  ·  view source on GitHub ↗
(Component)

Source from the content-addressed store, hash-verified

12import { PrivateRoutes } from "./components/PrivateRoutes";
13
14function 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
27export function AppRouter() {
28 const { user, setUser, isAuthenticated, isAuthReady, logOut } = useAuth();

Callers 1

AppRouterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected