mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 02:00:31 +08:00
Move reactive config part into session state
This PR moves the signer "clones" the signer property from the `Config` object into the `session` state, to allow Svelte reactivity, e.g. in the Testnet Faucet, where we rely on `config.signer` but since it only changes when the `Config` object in `App.svelte` changes we can't react on it. For now I only cloned the signer property, if we see in the future that there are other properties that need to change with session we can add them. Signed-off-by: Sebastian Martinez <sebastinez@me.com> Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
+1
-2
@@ -17,7 +17,6 @@
|
||||
export let session: Session | null;
|
||||
export let config: Config;
|
||||
|
||||
let sessionButton: HTMLElement | null = null;
|
||||
let sessionButtonHover = false;
|
||||
let mobileNavbarDisplayed = false;
|
||||
|
||||
@@ -182,7 +181,7 @@
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
<button class="address outline small" bind:this={sessionButton}
|
||||
<button class="address outline small"
|
||||
on:click={() => disconnectWallet(config)}
|
||||
on:mouseover={() => sessionButtonHover = true}
|
||||
on:focus={() => sessionButtonHover = true}
|
||||
|
||||
Reference in New Issue
Block a user