feat: improved on ui so that user can see the spaces they want to view easier #33
@@ -1,22 +1,21 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Snippet } from "svelte";
|
import type { Table } from "@supabase/supabase-js";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
space: Table<"study_spaces">;
|
||||||
alt: string;
|
alt: string;
|
||||||
imgSrc: string;
|
imgSrc: string;
|
||||||
title?: Snippet;
|
|
||||||
description?: Snippet;
|
|
||||||
href?: string;
|
href?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { alt, imgSrc, title, description, href }: Props = $props();
|
const { space, alt, imgSrc, href }: Props = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a class="card" {href}>
|
<a class="card" {href}>
|
||||||
<img src={imgSrc} {alt} />
|
<img src={imgSrc} {alt} />
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{@render title?.()}
|
<h1>{space.location}</h1>
|
||||||
{@render description?.()}
|
<p>{space.description}</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
@@ -26,15 +26,8 @@
|
|||||||
alt="Photo of {studySpace.description}"
|
alt="Photo of {studySpace.description}"
|
||||||
href="/space/{studySpace.id}"
|
href="/space/{studySpace.id}"
|
||||||
imgSrc={imgUrl}
|
imgSrc={imgUrl}
|
||||||
>
|
space={studySpace}
|
||||||
{#snippet title()}
|
/>
|
||||||
<h1>{studySpace.location}</h1>
|
|
||||||
{/snippet}
|
|
||||||
|
|
||||||
{#snippet description()}
|
|
||||||
<p>{studySpace.description}</p>
|
|
||||||
{/snippet}
|
|
||||||
</SpaceCard>
|
|
||||||
{/each}
|
{/each}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user