Add parked-domain aliases, Websites AI prompts, and frosted overflow menus.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
e9400c2281
commit
0d62a4ca79
@@ -140,11 +140,13 @@ function nextAnnualRenewal(contractAt: string, now = new Date()) {
|
||||
return { next: due, year: due.getFullYear(), daysRemaining }
|
||||
}
|
||||
|
||||
function oneYearFromTodayIso(from = new Date()) {
|
||||
function addOneYearToDueIso(contractAt: string, now = new Date()) {
|
||||
const current = nextAnnualRenewal(contractAt, now)
|
||||
if (!current) return null
|
||||
const next = new Date(
|
||||
from.getFullYear() + 1,
|
||||
from.getMonth(),
|
||||
from.getDate(),
|
||||
current.next.getFullYear() + 1,
|
||||
current.next.getMonth(),
|
||||
current.next.getDate(),
|
||||
12,
|
||||
0,
|
||||
0,
|
||||
@@ -894,7 +896,12 @@ export function BusinessesPage() {
|
||||
}
|
||||
|
||||
async function restartRenewalCountdown(b: BusinessListItem) {
|
||||
const annualRenewalAt = oneYearFromTodayIso()
|
||||
const contractAt = b.annualRenewalAt || b.createdAt
|
||||
const annualRenewalAt = addOneYearToDueIso(contractAt)
|
||||
if (!annualRenewalAt) {
|
||||
showToast('Unable to restart renewal countdown.', 'error')
|
||||
return
|
||||
}
|
||||
setSavingRenewalId(b.id)
|
||||
try {
|
||||
await updateBusiness(b.id, { annualRenewalAt })
|
||||
@@ -1525,8 +1532,8 @@ export function BusinessesPage() {
|
||||
className={styles.renewalRefreshBtn}
|
||||
onClick={() => void restartRenewalCountdown(b)}
|
||||
disabled={savingRenewalId === b.id}
|
||||
aria-label={`Restart renewal countdown for ${b.name}`}
|
||||
title="Restart countdown"
|
||||
aria-label={`Advance renewal one year from the contract date for ${b.name}`}
|
||||
title="Advance one year from the contract date"
|
||||
>
|
||||
<RefreshCw
|
||||
size={12}
|
||||
|
||||
Reference in New Issue
Block a user