import CardForm from "../../../components/forms/card_form";
import { useLoaderData, useActionData } from "react-router-dom";
import MainContentLayout from "../../../components/main_content_layout";

export function Edit() {
  const card = useLoaderData().data.data.attributes;
  const errors = useActionData();

  return(
    <MainContentLayout>
      <div className="w-4/5 my-6">
          <h1 className="my-6 text-3xl">
            Editar método de pago
          </h1>
          <CardForm card={card} errors={errors}/>
        </div>
    </MainContentLayout>
  );
}