svelte and nx rewrite

This commit is contained in:
2025-08-03 18:24:31 +02:00
parent e0a743056f
commit cb47cbc620
85 changed files with 1769 additions and 5202 deletions

View File

@@ -0,0 +1,27 @@
<script lang="ts">
import { deconstructLink } from '$lib/link-helper';
import LinkButton from '../link-button.svelte';
import { onMount } from 'svelte';
let { portableText } = $props();
const { value: button } = portableText;
let linkData: { href: string; target: string } | null = $state(null);
let mounted = $state(false);
onMount(async () => {
if (button?.link) {
linkData = await deconstructLink(button.link);
}
mounted = true;
});
</script>
{#if mounted && linkData}
<LinkButton
text={button?.text || ''}
{linkData}
variant="default"
size="default"
/>
{/if}