fix: Fixed favourites to not show up when a user hasn't been logged in

Co-Authored-By: Tadios Temesgen <tt2022@ic.ac.uk>
This commit is contained in:
Caspar Jojo Asaam
2025-06-13 12:43:31 +01:00
parent 7f305287f0
commit d767bc4fad
3 changed files with 23 additions and 15 deletions

View File

@@ -11,7 +11,8 @@
imgSrc: string;
href?: string;
isFavourite: boolean;
onToggleFavourite: () => void;
onToggleFavourite?: () => void;
}
const { space, hours, alt, imgSrc, href, isFavourite, onToggleFavourite }: Props = $props();
@@ -21,9 +22,11 @@
<!-- <img src={imgSrc} {alt} /> -->
<div class="image-container">
<img src={imgSrc} {alt} />
<div class="fav-button">
<Favourite {isFavourite} {onToggleFavourite} />
</div>
{#if onToggleFavourite}
<div class="fav-button">
<Favourite {isFavourite} {onToggleFavourite} />
</div>
{/if}
</div>
<div class="description">
<h1>{space.location}</h1>