From 2a709a517050198be387c6029b73e0e047867f82 Mon Sep 17 00:00:00 2001 From: cliffoo <41348973+cliffoo@users.noreply.github.com> Date: Mon, 5 Jun 2023 17:41:56 -0400 Subject: [PATCH 1/2] dashboard: Notify if no connected Frame account --- .../Sidebar/Bottom/MenuButton/index.tsx | 20 ++++++++++++++++++- .../src/utils/notifications/frame-wallet.tsx | 14 +++++++++++++ .../src/utils/notifications/index.ts | 1 + 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 packages/dashboard/src/utils/notifications/frame-wallet.tsx diff --git a/packages/dashboard/src/components/composed/Sidebar/Bottom/MenuButton/index.tsx b/packages/dashboard/src/components/composed/Sidebar/Bottom/MenuButton/index.tsx index 244451f9bad..341f4284916 100644 --- a/packages/dashboard/src/components/composed/Sidebar/Bottom/MenuButton/index.tsx +++ b/packages/dashboard/src/components/composed/Sidebar/Bottom/MenuButton/index.tsx @@ -1,9 +1,14 @@ import { Menu, Text, useMantineColorScheme, createStyles } from "@mantine/core"; +import { showNotification, hideNotification } from "@mantine/notifications"; import { useAccount, useConnect, useDisconnect } from "wagmi"; import { InjectedConnector } from "@wagmi/core"; import { Slash } from "react-feather"; import { useDash } from "src/hooks"; import Button from "src/components/composed/Sidebar/Bottom/MenuButton/Button"; +import { + frameWalletNotifications, + frameWalletNotificationId +} from "src/utils/notifications"; const useStyles = createStyles((theme, _params, _getRef) => { const { colors, colorScheme, fn } = theme; @@ -33,7 +38,20 @@ function MenuButton(): JSX.Element { const { classes } = useStyles(); if (!isConnected) { - return