mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 17:49:39 +02:00
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:
parent
c21793baaf
commit
81d5e83861
2 changed files with 3 additions and 5 deletions
|
|
@ -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 -->
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue