import Main from "./Main"

export default function Page({ pageTitle = null, pageBody = null, titleComponent = null }) {
	return (
		<Main>
			<div className="flex-1 flex flex-col overflow-auto">
				<div className="@container/main flex flex-col">
					<div className="flex flex-1">
						<div className="border-l-none w-full">
							<div className="border-b py-2 px-4 lg:px-6 bg-sidebar">
								<h2 className="scroll-m-20 font-semibold">
									{titleComponent ? titleComponent : <span>{pageTitle}</span>}
								</h2>
							</div>

							<div className="p-4 lg:p-6">{pageBody}</div>
						</div>
					</div>
				</div>
			</div>
		</Main>
	)
}
