text: import React from "react";
  import { Route } from "react-router-dom";
  import { withAuthenticationRequired } from "@auth0/auth0-react";
  import Loading from "../components/Loading";
  
  //From Auth0 docs - used on /profile path
  const ProtectedRoute = ({ component, ...args }) => (
    <Route
      component={withAuthenticationRequired(component, {
        onRedirecting: () => <Loading />,
      })}
      {...args}
    />
  );
  
  export default ProtectedRoute;