chore(web): migration svelte 5 syntax (#13883)

This commit is contained in:
Alex 2024-11-14 08:43:25 -06:00 committed by GitHub
parent 9203a61709
commit 0b3742cf13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
310 changed files with 6435 additions and 4176 deletions

View file

@ -4,12 +4,16 @@
import { mdiArrowUpLeft, mdiChevronRight } from '@mdi/js';
import { t } from 'svelte-i18n';
export let pathSegments: string[] = [];
export let getLink: (path: string) => string;
export let title: string;
export let icon: string;
interface Props {
pathSegments?: string[];
getLink: (path: string) => string;
title: string;
icon: string;
}
$: isRoot = pathSegments.length === 0;
let { pathSegments = [], getLink, title, icon }: Props = $props();
let isRoot = $derived(pathSegments.length === 0);
</script>
<nav class="flex items-center py-2">
@ -21,6 +25,7 @@
href={getLink(pathSegments.slice(0, -1).join('/'))}
class="mr-2"
padding="2"
onclick={() => {}}
/>
</div>
{/if}
@ -37,6 +42,7 @@
size="1.25em"
padding="2"
aria-current={isRoot ? 'page' : undefined}
onclick={() => {}}
/>
</li>
{#each pathSegments as segment, index}