import { Contract } from 'common/contract' import { range } from 'lodash' import { Carousel } from 'web/components/carousel' import { ContractCard } from 'web/components/contract/contract-card' import { ShowTime } from 'web/components/contract/contract-details' import { Col } from 'web/components/layout/col' export function DoubleCarousel(props: { contracts: Contract[] seeMoreUrl?: string showTime?: ShowTime loadMore?: () => void }) { const { contracts, showTime, loadMore } = props return (
{contracts.length >= 6 ? range(0, Math.floor(contracts.length / 2)).map((col) => { const i = col * 2 return ( ) }) : contracts.map((c) => ( ))} ) }