--- const { re } = Astro.props function formatTime(seconds) { if (seconds === 0) return null const h = Math.floor(seconds / 3600); const m = Math.floor((seconds % 3600) / 60); let result = ""; if (h > 0) result += `${h}h`; if (m > 0) result += `${m}m`; if (result === "") result = "0m"; return result; } const workTime = formatTime(re.worktime) const waitTime = formatTime(re.waittime) ---
{re.description}
Serves: {re.servings}
)} {workTime && ({workTime} Work
)} {waitTime && ({waitTime} Wait
)} {re.rating !== 0 && ({re.rating}
/10
)}