Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435<script lang="ts"> import type { Snippet } from "svelte"; import Bones, { type BonesCapture } from "#lib/components/ui/Bones.svelte"; import Section from "#lib/components/ui/Section.svelte"; import ListViewSwitch from "#lib/components/profile/ListViewSwitch.svelte"; import { listView } from "#lib/components/profile/listView.svelte.ts"; import { pagedListClass, switchableListClass } from "#lib/components/profile/PagedList.svelte";
interface Props { title?: string; rowCapture: BonesCapture; rows: number; header?: Snippet; switchable?: boolean; }
let { title, rowCapture, rows, header, switchable = false }: Props = $props();</script>
{#snippet actions()} <ListViewSwitch />{/snippet}
<!-- the same section and rows PagedList shows while paging, so the first load matches --><Section {title} empty={false} emptyMessage="" listClass={switchable ? switchableListClass[listView.current] : pagedListClass} actions={switchable ? actions : undefined} {header}> <Bones capture={rowCapture} repeat={rows} class="contents" /></Section>