horse-link / horse.link

Official website for https://alpha.horse.link
https://alpha.horse.link
2 stars 0 forks source link

Change scratched horses to the end of the table #621

Open bitcoinbrisbane opened 6 months ago

bitcoinbrisbane commented 6 months ago

Roll back like mobile, do the sets of runners twice. Use the concat function

      {/* mobile */}
      <div className="block lg:hidden">
        <div className="flex w-full items-center justify-between border border-hl-primary p-2">
          <span className="block">RUNNERS</span>
          <span className="block w-[5rem] text-hl-secondary">WIN</span>
        </div>
        {!runners?.length ? (
          <div className="flex w-full justify-center py-10">
            <Loader />
          </div>
        ) : (
          <div className="flex w-full flex-col items-center">
            {runners
              .filter(r => !scratchingArray.includes(r.status))
              .map(mapMobileRunner)}
            {runners
              .filter(r => scratchingArray.includes(r.status))
              .map(mapMobileRunner)}
          </div>
        )}
      </div>