import React from "react";
import Sidebar from "./Sidebar";
import Header from "./Header";

const Layout = ({ title, user, setUser, children }) => {
  return (
    <div className="min-h-screen bg-secondary text-primary md:flex">
      <Sidebar setUser={setUser} />
      <main className="w-full p-4 md:p-6">
        <Header title={title} user={user} />
        {children}
      </main>
    </div>
  );
};

export default Layout;
