"use client";
import { useState } from "react";
import IdComponent from "./IdComponent";

export default function Page() {
  let [idList, setIdList] = useState<string[]>([]);
  function submit() {
    console.log(idList);
  }
  return (
    <div>
      <IdComponent updateIdList={(cids) => setIdList(cids)} />
      <p className="flex justify-center gap-4 mt-2 items-center">
        Total: {idList.length}{" "}
        <button className="bg-green-200 p-2 rounded-md" onClick={submit}>
          Submit
        </button>
      </p>
    </div>
  );
}
