Fix ordering on single columns
This commit is contained in:
parent
0499cc5a68
commit
dde1ed98dd
|
@ -79,11 +79,10 @@ export function ContractsGrid(props: {
|
||||||
<Col className="gap-8">
|
<Col className="gap-8">
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'w-full columns-1 gap-4 space-y-4 md:columns-2',
|
'hidden w-full gap-4 space-y-4 md:block md:columns-2',
|
||||||
gridClassName
|
gridClassName
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{/* TODO: When columns-1, don't reorder the contracts */}
|
|
||||||
{twoColContracts.map((contract) => (
|
{twoColContracts.map((contract) => (
|
||||||
<ContractCard
|
<ContractCard
|
||||||
contract={contract}
|
contract={contract}
|
||||||
|
@ -101,6 +100,29 @@ export function ContractsGrid(props: {
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
className={clsx(
|
||||||
|
'w-full columns-1 gap-4 space-y-4 md:hidden',
|
||||||
|
gridClassName
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{contracts.map((contract) => (
|
||||||
|
<ContractCard
|
||||||
|
contract={contract}
|
||||||
|
key={contract.id}
|
||||||
|
showTime={showTime}
|
||||||
|
onClick={
|
||||||
|
onContractClick ? () => onContractClick(contract) : undefined
|
||||||
|
}
|
||||||
|
hideQuickBet={hideQuickBet}
|
||||||
|
hideGroupLink={hideGroupLink}
|
||||||
|
className={clsx(
|
||||||
|
'break-inside-avoid-column',
|
||||||
|
contractIds?.includes(contract.id) && highlightClassName
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
<VisibilityObserver
|
<VisibilityObserver
|
||||||
onVisibilityUpdated={onVisibilityUpdated}
|
onVisibilityUpdated={onVisibilityUpdated}
|
||||||
className="relative -top-96 h-1"
|
className="relative -top-96 h-1"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user