diff --git a/packages/keychain/src/components/DeployController.tsx b/packages/keychain/src/components/DeployController.tsx index 8219bdaa8..3463e718e 100644 --- a/packages/keychain/src/components/DeployController.tsx +++ b/packages/keychain/src/components/DeployController.tsx @@ -125,7 +125,7 @@ export function DeployController({ return ( } + icon={} title="Deploy Controller" description="This will initialize your controller on the new network" > @@ -199,7 +199,7 @@ export function DeployController({ return ( } + icon={} title="Success!" description={`Your controller has been deployed on ${chainName}`} > diff --git a/packages/keychain/src/components/ErrorAlert.tsx b/packages/keychain/src/components/ErrorAlert.tsx index db0a5898a..21fdaee00 100644 --- a/packages/keychain/src/components/ErrorAlert.tsx +++ b/packages/keychain/src/components/ErrorAlert.tsx @@ -3,6 +3,7 @@ import { CopyIcon, CheckIcon, ErrorAlertIcon, + ErrorAlertIconProps, } from "@cartridge/ui-next"; import { Text, @@ -19,12 +20,7 @@ import { Divider, } from "@chakra-ui/react"; import { motion } from "framer-motion"; -import React, { - ComponentProps, - ReactElement, - useEffect, - useState, -} from "react"; +import React, { ReactElement, useEffect, useState } from "react"; import { ErrorCode } from "@cartridge/account-wasm/controller"; import { ControllerError } from "@/utils/connection"; import { useConnection } from "@/hooks/connection"; @@ -75,11 +71,7 @@ export function ErrorAlert({ {variant && ( ["variant"] - } + variant={variant as ErrorAlertIconProps["variant"]} size="xs" /> )} @@ -122,9 +114,9 @@ export function ErrorAlert({ aria-label="Copy stacktrace" icon={ copied ? ( - + ) : ( - + ) } onClick={() => { diff --git a/packages/keychain/src/components/ErrorBoundary.tsx b/packages/keychain/src/components/ErrorBoundary.tsx index 4bc296be0..9fc0c2287 100644 --- a/packages/keychain/src/components/ErrorBoundary.tsx +++ b/packages/keychain/src/components/ErrorBoundary.tsx @@ -44,7 +44,7 @@ export function ErrorPage({ error }: { error: Error }) { variant="expanded" title="Uh oh!" description="Something went wrong" - icon={} + icon={} > Cartridge Discord - + diff --git a/packages/keychain/src/components/Fees.tsx b/packages/keychain/src/components/Fees.tsx index d1bf3c972..94de36286 100644 --- a/packages/keychain/src/components/Fees.tsx +++ b/packages/keychain/src/components/Fees.tsx @@ -81,7 +81,9 @@ function LineItem({ ) : ( {variant && } - {value !== "FREE" && } + {value !== "FREE" && ( + + )} {value} )} diff --git a/packages/keychain/src/components/Funding/DepositEth.tsx b/packages/keychain/src/components/Funding/DepositEth.tsx index 954a47841..fd1bbb57c 100644 --- a/packages/keychain/src/components/Funding/DepositEth.tsx +++ b/packages/keychain/src/components/Funding/DepositEth.tsx @@ -194,12 +194,8 @@ function DepositEthInner({ onComplete, onBack }: DepositEthProps) { colorScheme="colorful" onClick={() => onConnect(c)} > - {c.name === "argentX" && ( - - )} - {c.name === "braavos" && ( - - )} + {c.name === "argentX" && } + {c.name === "braavos" && } {c.name} ))} @@ -214,7 +210,7 @@ function DepositEthInner({ onComplete, onBack }: DepositEthProps) { )} diff --git a/packages/keychain/src/components/connect/SessionConsent.tsx b/packages/keychain/src/components/connect/SessionConsent.tsx index 606f5301e..0a42656f4 100644 --- a/packages/keychain/src/components/connect/SessionConsent.tsx +++ b/packages/keychain/src/components/connect/SessionConsent.tsx @@ -42,7 +42,7 @@ export function SessionConsent({ )} Authorize{" "} - {/* */} + {/* */} {origin} {" "} diff --git a/packages/keychain/src/components/failure.tsx b/packages/keychain/src/components/failure.tsx index 0b2bb593f..9ea0d87c1 100644 --- a/packages/keychain/src/components/failure.tsx +++ b/packages/keychain/src/components/failure.tsx @@ -27,7 +27,7 @@ export function Failure() { alignItems="center" > Discord - + diff --git a/packages/keychain/src/components/session/ContractCard.tsx b/packages/keychain/src/components/session/ContractCard.tsx index 3ba0273be..9d1651c7e 100644 --- a/packages/keychain/src/components/session/ContractCard.tsx +++ b/packages/keychain/src/components/session/ContractCard.tsx @@ -98,7 +98,7 @@ export function ContractCard({ ); } -export function humanizeString(str: string): string { +function humanizeString(str: string): string { return ( str // Convert from camelCase or snake_case diff --git a/packages/ui-next/src/components/icons/error-alert-icon.tsx b/packages/ui-next/src/components/icons/error-alert-icon.tsx index 58dfa81f5..d0200a49e 100644 --- a/packages/ui-next/src/components/icons/error-alert-icon.tsx +++ b/packages/ui-next/src/components/icons/error-alert-icon.tsx @@ -1,15 +1,17 @@ import { cn } from "@/utils"; import { InfoIcon, WarningIcon, AlertIcon as AlertIconRaw } from "./utility"; +export type ErrorAlertIconProps = { + variant: "info" | "warning" | "error"; + size?: "xs" | "default"; + className?: string; +}; + export function ErrorAlertIcon({ variant, size = "default", className, -}: { - variant: "info" | "warning" | "error"; - size?: "xs" | "default"; - className?: string; -}) { +}: ErrorAlertIconProps) { switch (variant) { case "info": return ( diff --git a/packages/ui-next/src/components/network.tsx b/packages/ui-next/src/components/network.tsx index 6ad5cec0f..c901cc0b4 100644 --- a/packages/ui-next/src/components/network.tsx +++ b/packages/ui-next/src/components/network.tsx @@ -36,15 +36,11 @@ export function Network({ chainId }: { chainId: string }) { {(() => { switch (chainId) { case constants.StarknetChainId.SN_MAIN: - return ; + return ; case constants.StarknetChainId.SN_SEPOLIA: - return ; + return ; default: - return isSlotChain(chainId) ? ( - - ) : ( - - ); + return isSlotChain(chainId) ? : ; } })()}
{getChainName(chainId)}