// Declare a variable:
const name = 'Gerdo';
// Access your variable
// from inside of a JSX expression:
const greeting = <p>Hello, {name}!</p>;
const componentMap = {
ADMIN: React.lazy(() => import("../components/Admin")),
USER: React.lazy(() => import("../components/User")),
NOT_FOUND: React.lazy(() => import("../components/NotFound")),
};
const Component = componentMap[props.type];
return <Component />;