import React, { Fragment } from 'react';
import { Route } from 'react-router-dom';

const LoadingRoute = ({ loading = false, element, ...rest }) => {
  debugger;
  console.log('this.type', this.type);
  return <Route {...rest} element={!loading ? element : <Fragment />} />;
};

// const LoadingRoute = Route;

// console.log('LoadingRoute', LoadingRoute);

export default LoadingRoute;
