diff --git a/src/routes/[network]/(account)/(staking)/staking/+page.svelte b/src/routes/[network]/(account)/(staking)/staking/+page.svelte index 8cd019fb1..b6fa544ec 100644 --- a/src/routes/[network]/(account)/(staking)/staking/+page.svelte +++ b/src/routes/[network]/(account)/(staking)/staking/+page.svelte @@ -9,6 +9,7 @@ import type { UnstakingRecord, WithdrawableBalance } from './utils'; import { getStakedBalance, getUnstakingBalances, getAPY } from './utils'; + import UnstakingBalances from './unstaking.svelte'; const context = getContext('state'); const { data } = $props(); @@ -46,39 +47,7 @@ > - - - - - - - - - - - {#each unstaking as record} - {#if !record.savings} - - - - {/if} - {/each} - -
AmountDate available
{record.balance}{record.date - ? record.date.toLocaleDateString(undefined, { - weekday: 'long', - year: 'numeric', - month: 'long', - day: 'numeric' - }) - : '--'} -
- -
+ diff --git a/src/routes/[network]/(account)/(staking)/staking/unstaking.svelte b/src/routes/[network]/(account)/(staking)/staking/unstaking.svelte new file mode 100644 index 000000000..baf281eb9 --- /dev/null +++ b/src/routes/[network]/(account)/(staking)/staking/unstaking.svelte @@ -0,0 +1,51 @@ + + + + + + + + + Amount + Date available + + + + {#each records as record} + {#if !record.savings} + + {record.balance} + + {record.date + ? record.date.toLocaleDateString(undefined, { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric' + }) + : '--'} + + + {/if} + {/each} + + + {#if href} + + {/if} + diff --git a/src/routes/[network]/(account)/(staking)/staking/withdraw/+page.svelte b/src/routes/[network]/(account)/(staking)/staking/withdraw/+page.svelte index bef21c35d..f63c7c2a5 100644 --- a/src/routes/[network]/(account)/(staking)/staking/withdraw/+page.svelte +++ b/src/routes/[network]/(account)/(staking)/staking/withdraw/+page.svelte @@ -13,6 +13,7 @@ import type { UnicoveContext } from '$lib/state/client.svelte'; import { getContext } from 'svelte'; import { WithdrawState } from './state.svelte'; + import UnstakingBalances from '../unstaking.svelte'; const context = getContext('state'); const { data } = $props(); @@ -43,35 +44,7 @@ > - - - - - - - - - - {#each withdrawState.unstaking as record} - {#if !record.savings} - - - - {/if} - {/each} - -
AmountDate available
{record.balance}{record.date - ? record.date.toLocaleDateString(undefined, { - weekday: 'long', - year: 'numeric', - month: 'long', - day: 'numeric' - }) - : '--'} -
-
+
{/if}