Hide per-date rescrape button for past columns
Scraping a past date via the hotel-page backend wouldn't return anything useful (Booking.com shows no availability for dates gone by). The ↻ button is now only rendered for today and future dates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c49985bec7
commit
0721769e03
1 changed files with 17 additions and 15 deletions
|
|
@ -1729,21 +1729,23 @@ const RateMatrixTab: React.FC = () => {
|
|||
<span style={styles.scrapeAge}>{scrapeAge}</span>
|
||||
) : null}
|
||||
<div style={{ display: 'flex', gap: 2, alignItems: 'center', justifyContent: 'center' }}>
|
||||
<button
|
||||
onClick={() => enqueueScrape(d, d)}
|
||||
disabled={queuePos >= 0}
|
||||
style={mergeStyles(
|
||||
styles.scrapeBtn,
|
||||
queuePos >= 0 ? styles.scrapeBtnActive : {}
|
||||
)}
|
||||
title={
|
||||
scrapingDate === d ? `Scraping ${d}…`
|
||||
: queuePos >= 0 ? `Queued (#${queuePos + 1})`
|
||||
: `Scrape ${d}`
|
||||
}
|
||||
>
|
||||
{scrapingDate === d ? '...' : queuePos >= 0 ? `#${queuePos + 1}` : '↻'}
|
||||
</button>
|
||||
{d >= todayStr && (
|
||||
<button
|
||||
onClick={() => enqueueScrape(d, d)}
|
||||
disabled={queuePos >= 0}
|
||||
style={mergeStyles(
|
||||
styles.scrapeBtn,
|
||||
queuePos >= 0 ? styles.scrapeBtnActive : {}
|
||||
)}
|
||||
title={
|
||||
scrapingDate === d ? `Scraping ${d}…`
|
||||
: queuePos >= 0 ? `Queued (#${queuePos + 1})`
|
||||
: `Scrape ${d}`
|
||||
}
|
||||
>
|
||||
{scrapingDate === d ? '...' : queuePos >= 0 ? `#${queuePos + 1}` : '↻'}
|
||||
</button>
|
||||
)}
|
||||
{locationName && d >= todayStr && (
|
||||
<a
|
||||
href={buildSearchUrl(locationName, d)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue