refactor into function

This commit is contained in:
counterweight 2025-03-10 16:11:57 +01:00
parent 4f1d6b4cfb
commit 56fa3e20e7
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -177,6 +177,12 @@ async function publishOffer() {
body: JSON.stringify({ offerDetails }),
});
toggleOfferCreatedAlert();
toggleCreateOfferModal();
}
function toggleOfferCreatedAlert() {
offerCreatedPopup.classList.remove('max-size-zero');
offerCreatedPopup.classList.add('revealed');
setTimeout(() => {
@ -185,8 +191,6 @@ async function publishOffer() {
setTimeout(() => {
offerCreatedPopup.classList.add('max-size-zero');
}, 4000);
toggleCreateOfferModal();
}
class Offer {