diff --git a/frontend/src/routes/book/+page.svelte b/frontend/src/routes/book/+page.svelte
index 7cc75e7..1062f28 100644
--- a/frontend/src/routes/book/+page.svelte
+++ b/frontend/src/routes/book/+page.svelte
@@ -628,6 +628,22 @@
return allSlots;
}
+ function formatDuration(minutes: number): string {
+ const hours = Math.floor(minutes / 60);
+ const remainingMinutes = minutes % 60;
+
+ if (hours === 0) {
+ return `${remainingMinutes} minutes`;
+ } else if (remainingMinutes === 0) {
+ return `${hours} ${hours === 1 ? 'hour' : 'hours'}`;
+ } else {
+ return `${hours} ${hours === 1 ? 'hour' : 'hours'} ${remainingMinutes} minutes`;
+ }
+ }
+
+ // Use the formatted duration everywhere
+ const formattedTotalDuration = $derived(formatDuration(getTotalDuration()));
+
function nextStep() {
if (currentStep < 4) {
currentStep++;
@@ -764,8 +780,8 @@
{/each}