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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user