3 min
All checks were successful
Deploy / CreateImage (push) Successful in 4m32s
Deploy / DeployService (push) Successful in 25s

This commit is contained in:
Nastya 2025-06-15 20:43:39 +03:00
parent 8604daf6a4
commit 5ff3d7ae16

@ -35,7 +35,7 @@ export const CopyButton = ({ created_at, onCopy, text }: CopyButtonProps) => {
const now = new Date().getTime(); const now = new Date().getTime();
const created = getCreatedTime(created_at); const created = getCreatedTime(created_at);
const diffInMinutes = (now - created) / (1000 * 60); const diffInMinutes = (now - created) / (1000 * 60);
return diffInMinutes < 2; return diffInMinutes < 3;
}); });
useEffect(() => { useEffect(() => {
@ -49,14 +49,14 @@ export const CopyButton = ({ created_at, onCopy, text }: CopyButtonProps) => {
setIsLoading(true); setIsLoading(true);
} }
if (diffInMinutes < 2) { if (diffInMinutes < 3) {
const timeLeft = Math.ceil((2 - diffInMinutes) * 60 * 1000); const timeLeft = Math.ceil((3 - diffInMinutes) * 60 * 1000);
setTimeLeft(formatTimeLeft(timeLeft)); setTimeLeft(formatTimeLeft(timeLeft));
const timer = setInterval(() => { const timer = setInterval(() => {
const currentTime = new Date().getTime(); const currentTime = new Date().getTime();
const elapsed = currentTime - created; const elapsed = currentTime - created;
const remaining = 2 * 60 * 1000 - elapsed; const remaining = 3 * 60 * 1000 - elapsed;
if (remaining <= 0) { if (remaining <= 0) {
setIsLoading(false); setIsLoading(false);