fix: revert @const to svelte:component (invalid placement in div)

@const can only be used inside {#if}, {#each}, etc. — not directly in
a <div>. Reverted ActionZone and AuthGateModal back to <svelte:component>
which works correctly (the deprecation warning is less important than
a broken app).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-03 12:04:18 +02:00
parent c21793baaf
commit 81d5e83861
2 changed files with 3 additions and 5 deletions

View file

@ -135,7 +135,7 @@
});
// Icon for action type
const ActionIcon = $derived(() => {
const actionIcon = $derived.by(() => {
switch (action) {
case 'save':
return CloudArrowUp;
@ -235,8 +235,7 @@
<div
class="bg-primary/10 mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full"
>
{@const Icon = ActionIcon()}
<Icon size={32} class="text-primary" />
<svelte:component this={actionIcon} size={32} class="text-primary" />
</div>
<!-- Title -->

View file

@ -60,8 +60,7 @@
role="button"
tabindex="-1"
>
{@const Icon = iconComponent}
<Icon size={20} weight="bold" />
<svelte:component this={iconComponent} size={20} weight="bold" />
{#if label}
<span class="action-label">{label}</span>
{/if}