{#if session} new {/if} {#if adminMode} {/if} {#if session} {/if}
{#each sortedStudySpaces as studySpace (studySpace.id)} {@const imgUrl = studySpace.study_space_images.length > 0 ? supabase.storage .from("files_bucket") .getPublicUrl(studySpace.study_space_images[0].image_path).data.publicUrl : defaultImg} handleToggleFavourite(studySpace.id) : undefined} isAvailable={studySpace.study_space_hours.length === 0 ? undefined : isOpenNow(studySpace.study_space_hours).isOpen} footer={studySpace.study_space_hours.length === 0 ? undefined : isOpenNow(studySpace.study_space_hours).message} /> {/each}