import { FC } from "react"; // ui import { Loader } from "components/ui"; // types import { ICycle } from "types"; export interface ICyclesList { cycles: ICycle[]; } export const CyclesList: FC = (props) => { const { cycles } = props; return (
{cycles ? ( <> {cycles.length > 0 ? (
{cycles.map((cycle) => (
handleDeleteCycle(cycle)} handleEditCycle={() => handleEditCycle(cycle)} handleAddToFavorites={() => handleAddToFavorites(cycle)} handleRemoveFromFavorites={() => handleRemoveFromFavorites(cycle)} />
))}
) : (

{cycleTab === "all" ? "No cycles" : `No ${cycleTab} cycles`}

)} ) : ( )}
); };