feat: improved on ui so that user can see the spaces they want to view easier #33

Merged
ca422 merged 5 commits from feat/study-card-visual-improvements into master 2025-06-05 11:03:37 +00:00
3 changed files with 26 additions and 17 deletions
Showing only changes of commit 6e72580a6a - Show all commits

View File

@@ -1,22 +1,21 @@
<script lang="ts">
import type { Snippet } from "svelte";
import type { Table } from "@supabase/supabase-js";
interface Props {
space: Table<"study_spaces">;
alt: string;
imgSrc: string;
title?: Snippet;
description?: Snippet;
href?: string;
}
const { alt, imgSrc, title, description, href }: Props = $props();
const { space, alt, imgSrc, href }: Props = $props();
</script>
<a class="card" {href}>
<img src={imgSrc} {alt} />
<div class="description">
{@render title?.()}
{@render description?.()}
<h1>{space.location}</h1>
<p>{space.description}</p>
</div>
</a>

View File

@@ -26,15 +26,8 @@
alt="Photo of {studySpace.description}"
href="/space/{studySpace.id}"
imgSrc={imgUrl}
>
{#snippet title()}
<h1>{studySpace.location}</h1>
{/snippet}
{#snippet description()}
<p>{studySpace.description}</p>
{/snippet}
</SpaceCard>
space={studySpace}
/>
{/each}
</main>