import { useLoaderData } from "react-router";
import type { ClubDetail } from "../types";
import { ClubEvenList } from "../components/ClubEventList";
import { ClubSummary } from "../components/ClubSummary";

export const ClubEventsPage = () => {
  const { info } = useLoaderData<{
    info: ClubDetail;
  }>();

  return (
    <div className="app">
      <ClubSummary clubId={info.id} />
      <ClubEvenList clubId={info.id} />
    </div>
  );
}