Something went wrong. Try again.
Monorepo for Tangled
Something went wrong. Try again.
Svelte
1234567891011121314151617181920212223242526272829303132333435<script lang="ts"> import type { RepoAccess } from "$lib/api/access"; import type { RepoCounts, RepoInfo, RepoSource } from "$lib/components/repo/types"; import RepoHeader from "$lib/components/repo/RepoHeader.svelte"; import RepoTabs from "$lib/components/repo/RepoTabs.svelte";
interface Props { // awaited here, below the layout's boundary, so the navigation is never held repo: RepoInfo | Promise<RepoInfo>; counts: Promise<RepoCounts> | RepoCounts; viewerStarRkey: Promise<string | null> | string | null; source: Promise<RepoSource | null> | RepoSource | null; access: RepoAccess | Promise<RepoAccess>; activeTab: string; showTabs?: boolean; }
let { repo: repoField, counts, viewerStarRkey, source, access, activeTab, showTabs = true }: Props = $props();
const repo = $derived(await repoField);</script>
<RepoHeader {repo} {counts} {viewerStarRkey} {source} />{#if showTabs} <RepoTabs {repo} {counts} {access} active={activeTab} />{/if}