From 1d23e5cd9c72db9bad210cceffb9697ede919d86 Mon Sep 17 00:00:00 2001 From: MananTank Date: Mon, 31 Mar 2025 19:07:57 +0000 Subject: [PATCH] Dashboard: Fix AA page alert styles (#6596) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR focuses on refactoring the `SmartWalletsBillingAlert` component in the `Alerts.tsx` file. It updates the alert's UI and removes the dismissible functionality, while also changing the import paths for components used in the alert. ### Detailed summary - Removed unused imports related to `Alert`, `AlertDescription`, `AlertIcon`, `AlertTitle`, `Flex`, and `IconButton`. - Updated imports for `Alert`, `AlertDescription`, `AlertTitle`, `TrackedUnderlineLink`, and `CircleAlertIcon`. - Removed the `dismissible` prop and related logic. - Simplified the alert structure with a new layout. - Changed the alert icon and styling. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../components/settings/ApiKeys/Alerts.tsx | 93 ++++--------------- 1 file changed, 17 insertions(+), 76 deletions(-) diff --git a/apps/dashboard/src/components/settings/ApiKeys/Alerts.tsx b/apps/dashboard/src/components/settings/ApiKeys/Alerts.tsx index 793f815044f..e71f635e033 100644 --- a/apps/dashboard/src/components/settings/ApiKeys/Alerts.tsx +++ b/apps/dashboard/src/components/settings/ApiKeys/Alerts.tsx @@ -1,81 +1,22 @@ -"use client"; - -import { - Alert, - AlertDescription, - AlertIcon, - AlertTitle, - Flex, - IconButton, -} from "@chakra-ui/react"; -import { useLocalStorage } from "hooks/useLocalStorage"; -import { XIcon } from "lucide-react"; -import { Text, TrackedLink } from "tw-components"; - -export const SmartWalletsBillingAlert = ({ - dismissible = false, -}: { - dismissible?: boolean; -}) => { - const [dismissed, setDismissed] = useLocalStorage( - "dismissed-smart-wallets-billing-alert", - false, - true, - ); - - if (dismissible && dismissed) { - return true; - } +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { TrackedUnderlineLink } from "@/components/ui/tracked-link"; +import { CircleAlertIcon } from "lucide-react"; +export const SmartWalletsBillingAlert = () => { return ( - -
- - - Account Abstraction on Mainnet - - - You've enabled Account Abstraction for one of your API keys. -
- To enable AA on mainnet chains, -
{" "} - - - subscribe to a billing plan. - - -
-
-
- - {dismissible && ( - } - colorScheme="blackAlpha" - color="white" - variant="ghost" - opacity={0.6} - _hover={{ opacity: 1 }} - onClick={() => setDismissed(true)} - /> - )} + + + Account Abstraction on Mainnet + + To enable AA on mainnet chains,{" "} + + subscribe to a billing plan. + + ); };