import { useData } from "../api/useData";
import { Incident } from "./Incident";

export const Incidents = () => {
  const { incidents, loading } = useData();

  return (
    <div className="flex flex-col justify-between gap-2">
      {loading
        ? null
        : incidents.map((incident) => (
            <Incident key={incident.id} {...incident} />
          ))}
    </div>
  );
};
