From 18164c46ee4745126ecd79bd260c9c839f7e4d4c Mon Sep 17 00:00:00 2001 From: 0xmugen Date: Fri, 11 Oct 2024 07:34:03 +0200 Subject: [PATCH] feat: when already connectd doen't ask to connect again --- client/src/routes/+page.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/routes/+page.svelte b/client/src/routes/+page.svelte index 4085ec67..ead9cd40 100644 --- a/client/src/routes/+page.svelte +++ b/client/src/routes/+page.svelte @@ -5,6 +5,7 @@ import { playSoundEffectLoop } from '$lib/3d/utils/audioUtils'; import { onMount } from 'svelte'; import { connect } from '$lib/controller'; + import { account } from '$stores/account'; import { env } from '$stores/network'; import { initializeStore } from '$stores/dojoStore' @@ -20,7 +21,9 @@ async function connectAndGoto(config: string) { env.set(config as "mainnet" | "slot"); await initStore(); - await connect(config); + if (!$account) { + await connect(config); + } goto(`${config}/client/games/openGames`); }