This repository has no description
1<script lang="ts">
2 import { resolve } from "$app/paths";
3 import RepoCard from "$lib/components/repo/RepoCard.svelte";
4 import Card from "$lib/components/ui/Card.svelte";
5 import Section from "$lib/components/ui/Section.svelte";
6 import type { StarData } from "../types";
7
8 let { stars }: { stars: StarData[] } = $props();
9</script>
10
11<Section title="Starred" empty={stars.length === 0} emptyMessage="No stars yet.">
12 {#each stars as star (star.uri)}
13 {#if star.kind === "repo"}
14 <RepoCard repo={star.repo} />
15 {:else}
16 <Card shadow={false} class="flex items-center gap-2">
17 <a
18 href={resolve(`/${star.ownerHandle}/strings/${star.rkey}` as "/")}
19 class="truncate font-bold text-foreground-default no-underline hover:underline"
20 >
21 {star.ownerHandle}/{star.rkey}
22 </a>
23 </Card>
24 {/if}
25 {/each}
26</Section>