From 801f04f417369091f9fa9914acde15298949a7dd Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Tue, 17 Dec 2024 11:28:50 +0100 Subject: [PATCH] fix:
cannot be a child of

(#6024) # Motivation Fix warning which becomes an error with Svelte v5 tooling (PR #6020). ``` /Users/daviddalbusco/projects/dfinity/nns-dapp/frontend/src/lib/components/accounts/CkBTCInfoCard.svelte 85:15 error `

` cannot be a descendant of `

`. When rendering this component on the server, the resulting HTML will be modified by the browser (by moving, removing, or inserting elements), likely resulting in a `hydration_mismatch` warning https://svelte.dev/e/node_invalid_placement_ssr(node_invalid_placement_ssr) svelte/valid-compile ``` # Changes - Transform container `p` into a `div`. Signed-off-by: David Dal Busco --- frontend/src/lib/components/accounts/CkBTCInfoCard.svelte | 4 ++-- frontend/src/lib/routes/Settings.svelte | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/components/accounts/CkBTCInfoCard.svelte b/frontend/src/lib/components/accounts/CkBTCInfoCard.svelte index 6e3c0ec6db3..88df0cd6641 100644 --- a/frontend/src/lib/components/accounts/CkBTCInfoCard.svelte +++ b/frontend/src/lib/components/accounts/CkBTCInfoCard.svelte @@ -66,7 +66,7 @@ {$i18n.ckbtc.receive_btc_title}

-

+

{$i18n.ckbtc.ckbtc_buzz_words} {#if nonNullish(account)} . {/if} -

+
diff --git a/frontend/src/lib/routes/Settings.svelte b/frontend/src/lib/routes/Settings.svelte index 5a609c3173c..1b87873381b 100644 --- a/frontend/src/lib/routes/Settings.svelte +++ b/frontend/src/lib/routes/Settings.svelte @@ -53,7 +53,7 @@

{$i18n.settings.your_session}

-

+

{#if nonNullish(remainingTimeMilliseconds)} {remainingTimeMilliseconds <= 0 ? "0" @@ -64,7 +64,7 @@ {:else}
{/if} -

+
{$i18n.settings.your_session_description}