convert legacy reactive statement to $effect in cospend layout
All checks were successful
CI / update (push) Successful in 1m23s

Replace `$:` reactive statement with `$effect` rune to fix build error in Svelte 5 runes mode.
This commit is contained in:
2025-12-27 16:05:49 +01:00
parent 0197191f02
commit 43403a63e8

View File

@@ -18,7 +18,7 @@
user = data.session.user; user = data.session.user;
} }
$: { $effect(() => {
// Check if URL contains payment view route OR if we have paymentId in state // Check if URL contains payment view route OR if we have paymentId in state
const match = $page.url.pathname.match(/\/cospend\/payments\/view\/([^\/]+)/); const match = $page.url.pathname.match(/\/cospend\/payments\/view\/([^\/]+)/);
const statePaymentId = $page.state?.paymentId; const statePaymentId = $page.state?.paymentId;
@@ -32,7 +32,7 @@
showModal = false; showModal = false;
paymentId = null; paymentId = null;
} }
} });
async function handlePaymentDeleted() { async function handlePaymentDeleted() {
// Close the modal // Close the modal