Skip to content

Commit 1d23e5c

Browse files
committed
Dashboard: Fix AA page alert styles (#6596)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## 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}` <!-- end pr-codex -->
1 parent a17d893 commit 1d23e5c

File tree

1 file changed

+17
-76
lines changed
  • apps/dashboard/src/components/settings/ApiKeys

1 file changed

+17
-76
lines changed
Lines changed: 17 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,22 @@
1-
"use client";
2-
3-
import {
4-
Alert,
5-
AlertDescription,
6-
AlertIcon,
7-
AlertTitle,
8-
Flex,
9-
IconButton,
10-
} from "@chakra-ui/react";
11-
import { useLocalStorage } from "hooks/useLocalStorage";
12-
import { XIcon } from "lucide-react";
13-
import { Text, TrackedLink } from "tw-components";
14-
15-
export const SmartWalletsBillingAlert = ({
16-
dismissible = false,
17-
}: {
18-
dismissible?: boolean;
19-
}) => {
20-
const [dismissed, setDismissed] = useLocalStorage(
21-
"dismissed-smart-wallets-billing-alert",
22-
false,
23-
true,
24-
);
25-
26-
if (dismissible && dismissed) {
27-
return true;
28-
}
1+
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
2+
import { TrackedUnderlineLink } from "@/components/ui/tracked-link";
3+
import { CircleAlertIcon } from "lucide-react";
294

5+
export const SmartWalletsBillingAlert = () => {
306
return (
31-
<Alert
32-
status="warning"
33-
borderRadius="md"
34-
as={Flex}
35-
alignItems="start"
36-
justifyContent="space-between"
37-
mb={4}
38-
variant="left-accent"
39-
bg="backgroundCardHighlight"
40-
>
41-
<div className="flex flex-row">
42-
<AlertIcon boxSize={4} mt={1} ml={1} />
43-
<Flex flexDir="column" gap={1} pl={1}>
44-
<AlertTitle>Account Abstraction on Mainnet</AlertTitle>
45-
<AlertDescription>
46-
<Text as="span" pr={1}>
47-
You&apos;ve enabled Account Abstraction for one of your API keys.
48-
<br />
49-
To enable AA on mainnet chains,
50-
</Text>{" "}
51-
<TrackedLink
52-
href="/team/~/~/settings/billing"
53-
category="api_keys"
54-
label="smart_wallets_missing_billing"
55-
fontWeight="medium"
56-
color="blue.500"
57-
>
58-
<Text as="span" color="blue.500">
59-
subscribe to a billing plan.
60-
</Text>
61-
</TrackedLink>
62-
</AlertDescription>
63-
</Flex>
64-
</div>
65-
66-
{dismissible && (
67-
<IconButton
68-
size="xs"
69-
aria-label="Close notice"
70-
icon={<XIcon className="size-4" />}
71-
colorScheme="blackAlpha"
72-
color="white"
73-
variant="ghost"
74-
opacity={0.6}
75-
_hover={{ opacity: 1 }}
76-
onClick={() => setDismissed(true)}
77-
/>
78-
)}
7+
<Alert variant="warning">
8+
<CircleAlertIcon className="size-5" />
9+
<AlertTitle>Account Abstraction on Mainnet</AlertTitle>
10+
<AlertDescription>
11+
To enable AA on mainnet chains,{" "}
12+
<TrackedUnderlineLink
13+
href="/team/~/~/settings/billing"
14+
category="api_keys"
15+
label="smart_wallets_missing_billing"
16+
>
17+
subscribe to a billing plan.
18+
</TrackedUnderlineLink>
19+
</AlertDescription>
7920
</Alert>
8021
);
8122
};

0 commit comments

Comments
 (0)