diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ee2ac43f..14c51db1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features +- [#854](https://github.com/alleslabs/celatone-frontend/pull/854) Create PageHeaderContainer component - [#851](https://github.com/alleslabs/celatone-frontend/pull/851) Add amp validator list page - [#848](https://github.com/alleslabs/celatone-frontend/pull/848) Change Initia's config to use the new chain IDs (mahalo-2, minimove-2, miniwasm-2) - [#847](https://github.com/alleslabs/celatone-frontend/pull/847) Add amp proposal details page diff --git a/src/lib/components/PageContainer.tsx b/src/lib/components/PageContainer.tsx index 8abb443e7..9a634f182 100644 --- a/src/lib/components/PageContainer.tsx +++ b/src/lib/components/PageContainer.tsx @@ -1,12 +1,7 @@ import type { BoxProps } from "@chakra-ui/react"; import { Box } from "@chakra-ui/react"; -import type { ReactNode } from "react"; -interface PageContainerProps extends BoxProps { - children: ReactNode; -} - -const PageContainer = ({ children, ...containerProps }: PageContainerProps) => ( +const PageContainer = ({ children, ...containerProps }: BoxProps) => ( ( + + {children} + +); + +export default PageHeaderContainer; diff --git a/src/lib/layout/SubHeader.tsx b/src/lib/layout/SubHeader.tsx index 6f6229591..fcb5d62cd 100644 --- a/src/lib/layout/SubHeader.tsx +++ b/src/lib/layout/SubHeader.tsx @@ -70,52 +70,48 @@ const SubHeader = () => { }; return ( - - - {subHeaderMenu.map((item) => ( - trackOnClick(item.name)} - > - svg, > p": { - color: activeColor, - transition: "all .25s ease-in-out", - }, - borderBottomWidth: 2, - borderColor: activeColor, + + {subHeaderMenu.map((item) => ( + trackOnClick(item.name)} + > + svg, > p": { + color: activeColor, + transition: "all .25s ease-in-out", }, - }} + borderBottomWidth: 2, + borderColor: activeColor, + }, + }} + > + + - - - {item.name} - - - - ))} - + {item.name} + + + + ))} ); }; diff --git a/src/lib/layout/index.tsx b/src/lib/layout/index.tsx index 5066eb63a..1e54b3bea 100644 --- a/src/lib/layout/index.tsx +++ b/src/lib/layout/index.tsx @@ -65,7 +65,7 @@ const Layout = ({ children }: LayoutProps) => { @@ -75,6 +75,7 @@ const Layout = ({ children }: LayoutProps) => { bg={{ base: "background.main", md: "gray.900" }} area="nav" overflowY="auto" + mr={1} > diff --git a/src/lib/pages/validator-details/components/validator-top/index.tsx b/src/lib/pages/validator-details/components/validator-top/index.tsx index e1184e06f..ff40e973f 100644 --- a/src/lib/pages/validator-details/components/validator-top/index.tsx +++ b/src/lib/pages/validator-details/components/validator-top/index.tsx @@ -22,13 +22,7 @@ export const ValidatorTop = ({ totalVotingPower, singleStakingDenom, }: ValidatorTopProps) => ( - + <> - + ); diff --git a/src/lib/pages/validator-details/index.tsx b/src/lib/pages/validator-details/index.tsx index 706e14d26..961c33964 100644 --- a/src/lib/pages/validator-details/index.tsx +++ b/src/lib/pages/validator-details/index.tsx @@ -12,6 +12,7 @@ import { import { CustomTab } from "lib/components/CustomTab"; import { Loading } from "lib/components/Loading"; import PageContainer from "lib/components/PageContainer"; +import PageHeaderContainer from "lib/components/PageHeaderContainer"; import { ErrorFetching, InvalidState } from "lib/components/state"; import { useAssetInfos } from "lib/services/assetService"; import { useValidatorData } from "lib/services/validatorService"; @@ -71,11 +72,13 @@ const ValidatorDetailsBody = ({ return ( <> - + + + { const scrollComponentId = "validator-table-header"; return ( <> - + Validators @@ -115,7 +110,7 @@ const Validators = () => { amptrackSection="validator-list-search" /> - +