import { Navigate, Outlet } from "react-router-dom";
import ProfileHeader from "../components/common/ProfileHeader";
import Footer from "../components/common/Footer";
import { isAuthenticated } from "../utills/auth";
const ProfileLayout = () => {
  const auth = isAuthenticated();
  return (
    <>
      <ProfileHeader />
      <div
        className="page-wrapper w-[100%] max-w-[1400px] mx-auto p-2"
        style={{
          marginBottom: "10px",
          overflowX: "hidden",
        }}
      >
        {/* <Outlet /> */}

        {auth ? <Outlet /> : <Navigate to="/login" replace />}
      </div>

      <Footer />
    </>
  );
};

export default ProfileLayout;
