From 4bed0e289fa0f9934d4abb75f1fcfcb7cf5e369e Mon Sep 17 00:00:00 2001 From: jimenezz22 Date: Fri, 3 Jan 2025 16:20:16 -0600 Subject: [PATCH] feat: add disconnect functionality from Controller --- client/dev-dist/sw.js | 2 +- .../ControllerConnectButton.tsx | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/client/dev-dist/sw.js b/client/dev-dist/sw.js index 22806ed..aa31e0c 100644 --- a/client/dev-dist/sw.js +++ b/client/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-20a2f87f'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.qiado3ofr4g" + "revision": "0.d3t8v1f51lg" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/client/src/components/CartridgeController/ControllerConnectButton.tsx b/client/src/components/CartridgeController/ControllerConnectButton.tsx index 855a724..f754772 100644 --- a/client/src/components/CartridgeController/ControllerConnectButton.tsx +++ b/client/src/components/CartridgeController/ControllerConnectButton.tsx @@ -1,20 +1,26 @@ -import { useConnect, useAccount } from "@starknet-react/core"; +import { useConnect, useAccount, useDisconnect} from "@starknet-react/core"; import dojo from '../../img/dojo-icon.svg' const ControllerConnectButton = () => { const { connect, connectors } = useConnect(); const { address, status } = useAccount(); + const { disconnect } = useDisconnect() return (
{connectors.map((connector) => ( status === "connected" ? ( - +
+ + +
) : (