Skip to content

Commit

Permalink
Update build snapshot.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail committed Oct 18, 2024
1 parent f80a1e3 commit f947e72
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/__snapshots__/qa.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ var formatDeadline = (time, locales = [LOCALE, void 0]) => {
unit = "hour";
}
const isLastMinute = unit === "minute" && timeLeft < 2;
const nonNegTimeLeft = Math.max(0, timeLeft);
for (const locale of locales) {
try {
const formattedTimeLeft = new Intl.NumberFormat(locale, {
Expand All @@ -126,13 +127,13 @@ var formatDeadline = (time, locales = [LOCALE, void 0]) => {
minimumFractionDigits: isLastMinute ? 1 : 0,
maximumFractionDigits: isLastMinute ? 1 : 0,
unit
}).format(Math.max(0, timeLeft));
}).format(nonNegTimeLeft);
return \`in \${formattedTimeLeft}\`;
} catch (error) {
console.warn(\`Failed to format time using \${locale} locale\`, error);
}
}
return \`in \${timeLeft} \${unit}\${timeLeft > 1 ? "s" : ""}\`;
return \`in \${nonNegTimeLeft} \${unit}\${nonNegTimeLeft === 1 ? "" : "s"}\`;
};
var getCountdownDelay = (deadline) => deadline - Date.now() > 12e4 ? 6e4 : 1e3;
var setCountdown = (selector, deadline) => {
Expand Down

0 comments on commit f947e72

Please sign in to comment.