diff --git a/src/assets/chevronDownBlack.svg b/src/assets/chevronDownBlack.svg new file mode 100644 index 0000000..3fe97eb --- /dev/null +++ b/src/assets/chevronDownBlack.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/chevronUp.svg b/src/assets/chevronUp.svg new file mode 100644 index 0000000..224851e --- /dev/null +++ b/src/assets/chevronUp.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/TopBar.vue b/src/components/TopBar.vue index 6b7de9f..25989d0 100644 --- a/src/components/TopBar.vue +++ b/src/components/TopBar.vue @@ -2,6 +2,7 @@ import router from "@/router"; import { storeToRefs } from "pinia"; import { useEtherStore } from "../store/ether"; +import { ref } from "vue"; import blockchain from "../utils/blockchain"; // Store reference @@ -9,6 +10,9 @@ const etherStore = useEtherStore(); const { walletAddress, balance } = storeToRefs(etherStore); +const menuOpenToggle = ref(false); +const menuHoverToggle = ref(false); + //Methods const connectMetaMask = () => { blockchain.connectProvider(); @@ -28,31 +32,27 @@ const formatWalletBalance = (): String => { const fixed = Number(balance.value); return fixed.toFixed(2); }; + +const disconnectUser = () => { + etherStore.setWalletAddress(""); + const currentRoute = router.currentRoute.value.path; + if (currentRoute !== "/") { + router.push("/"); + } else { + window.location.reload(); + } +};