import { getPortfolioSettings } from "../../../utils";
import GeneralSettingsForm from "./GeneralSettingsForm";
import DangerZone from "./DangerZone";

export default async function GeneralSettingsPage(props: {
  params: Promise<{ slug: string }>;
}) {
  const { slug } = await props.params;
  const portfolioSettingsData = await getPortfolioSettings(slug);

  return (
    <div className="text-brandblue">
      <GeneralSettingsForm
        portfolioId={slug}
        portfolioSettingsData={portfolioSettingsData}
      />
      <DangerZone portfolioId={slug} portfolioName={portfolioSettingsData.name} />
    </div>
  );
}
