diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d5cc130c..d1bbccdc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Improvements +- [#371](https://github.com/alleslabs/celatone-frontend/pull/371) Refactor assign me component and fix color in redelegation page - [#342](https://github.com/alleslabs/celatone-frontend/pull/342) Add fallback n/a token on asset icon on asset box - [#331](https://github.com/alleslabs/celatone-frontend/pull/331) Add validation check for builder in proposal to store code page - [#324](https://github.com/alleslabs/celatone-frontend/pull/324) Add deposit/voting period from gov params and add minimum required alert for proposal to store code diff --git a/src/lib/components/AssignMe.tsx b/src/lib/components/AssignMe.tsx index c2739439a..2a5b43643 100644 --- a/src/lib/components/AssignMe.tsx +++ b/src/lib/components/AssignMe.tsx @@ -1,18 +1,25 @@ import { Text } from "@chakra-ui/react"; +import type { TextProps } from "@chakra-ui/react"; import { useWallet } from "@cosmos-kit/react"; import type { MouseEventHandler } from "react"; interface AssginMeProps { onClick?: MouseEventHandler; isDisable?: boolean; + textAlign?: TextProps["textAlign"]; } -export const AssignMe = ({ onClick, isDisable = false }: AssginMeProps) => { +export const AssignMe = ({ + onClick, + isDisable = false, + textAlign = "right", +}: AssginMeProps) => { const { address: walletAddress } = useWallet(); const enabled = Boolean(!isDisable && walletAddress); + return ( - + {formatUTC(nonRedelegatable.completionTime)} diff --git a/src/lib/pages/faucet/index.tsx b/src/lib/pages/faucet/index.tsx index 898b9c23f..0f85fc3b0 100644 --- a/src/lib/pages/faucet/index.tsx +++ b/src/lib/pages/faucet/index.tsx @@ -17,6 +17,7 @@ import { useInternalNavigate, useValidateAddress, } from "lib/app-provider"; +import { AssignMe } from "lib/components/AssignMe"; import type { FormStatus } from "lib/components/forms"; import { TextInput } from "lib/components/forms"; import { CustomIcon } from "lib/components/icon"; @@ -158,19 +159,14 @@ const Faucet = () => { status={status} label="Receiving Address" helperAction={ - { AmpTrack(AmpEvent.USE_ASSIGN_ME); setAddress(walletAddress); }} - > - Assign me - + isDisable={address === walletAddress} + textAlign="left" + /> } />