From c79ce61d04eb0a4c21cd40bf319072f4e61b9430 Mon Sep 17 00:00:00 2001 From: Jennie Alles Date: Wed, 20 Mar 2024 11:09:37 +0700 Subject: [PATCH 1/9] feat(components): add link to document in recent pages --- src/lib/components/FeedbackLink.tsx | 31 +++++++++++ src/lib/components/PageHeader.tsx | 36 +++++++++++++ src/lib/components/UserDocsLink.tsx | 78 ++++++++++++++++++++++++++++ src/lib/layout/Footer.tsx | 32 +++--------- src/lib/layout/InformationFooter.tsx | 68 ++++++++++++++++++++++++ src/lib/layout/navbar/Expand.tsx | 4 +- src/lib/pages/blocks/index.tsx | 13 +++-- src/lib/pages/code-details/index.tsx | 6 +++ src/lib/pages/codes/index.tsx | 36 ++++++------- src/lib/pages/contracts/index.tsx | 15 +++--- src/lib/pages/pools/index.tsx | 28 ++++++++-- src/lib/pages/proposals/index.tsx | 10 +++- src/lib/pages/txs/index.tsx | 14 ++--- src/lib/pages/validators/index.tsx | 16 +++--- 14 files changed, 303 insertions(+), 84 deletions(-) create mode 100644 src/lib/components/FeedbackLink.tsx create mode 100644 src/lib/components/PageHeader.tsx create mode 100644 src/lib/components/UserDocsLink.tsx create mode 100644 src/lib/layout/InformationFooter.tsx diff --git a/src/lib/components/FeedbackLink.tsx b/src/lib/components/FeedbackLink.tsx new file mode 100644 index 000000000..56665d815 --- /dev/null +++ b/src/lib/components/FeedbackLink.tsx @@ -0,0 +1,31 @@ +import { track } from "@amplitude/analytics-browser"; +import { Flex, Text } from "@chakra-ui/react"; +import Link from "next/link"; + +import { AmpEvent } from "lib/amplitude"; + +import { CustomIcon } from "./icon"; + +export const FeedbackLink = () => ( + track(AmpEvent.FEEDBACK)} + > + + + + Feedback + + + +); diff --git a/src/lib/components/PageHeader.tsx b/src/lib/components/PageHeader.tsx new file mode 100644 index 000000000..6262afbdd --- /dev/null +++ b/src/lib/components/PageHeader.tsx @@ -0,0 +1,36 @@ +import { Flex, Heading, Text } from "@chakra-ui/react"; + +import { useMobile } from "lib/app-provider"; + +import { UserDocsLink } from "./UserDocsLink"; + +interface PageHeaderProps { + title: string; + subtitle: string; + docHref: string; +} +export const PageHeader = ({ title, subtitle, docHref }: PageHeaderProps) => { + const isMobile = useMobile(); + return ( + + + + + {title} + + {isMobile && } + + + {subtitle} + + + {!isMobile && } + + ); +}; diff --git a/src/lib/components/UserDocsLink.tsx b/src/lib/components/UserDocsLink.tsx new file mode 100644 index 000000000..3b610a5d1 --- /dev/null +++ b/src/lib/components/UserDocsLink.tsx @@ -0,0 +1,78 @@ +import { Button, Flex, Text } from "@chakra-ui/react"; +import Link from "next/link"; + +import { CustomIcon } from "./icon"; + +interface UserDocsLinkProps { + href: string; + title?: string; + cta?: string; + isButton?: boolean; + isSmall?: boolean; +} + +export const UserDocsLink = ({ + title, + cta, + href, + isButton = false, + isSmall = true, +}: UserDocsLinkProps) => { + const baseLink = "https://docs.alleslabs.com/"; + return isButton ? ( + + + + ) : ( + + + {title} + + + *": { + color: "primary.light", + textDecoration: "underline", + transition: "all", + transitionDuration: "0.25s", + transitionTimingFunction: "ease-in-out", + }, + }, + }} + > + + + {cta} + + + + + ); +}; diff --git a/src/lib/layout/Footer.tsx b/src/lib/layout/Footer.tsx index fe91df7f3..bba595139 100644 --- a/src/lib/layout/Footer.tsx +++ b/src/lib/layout/Footer.tsx @@ -4,9 +4,12 @@ import Link from "next/link"; import { CURR_THEME } from "env"; import { AmpEvent, track, trackSocial } from "lib/amplitude"; +import { useMobile } from "lib/app-provider"; import { CustomIcon } from "lib/components/icon"; import type { IconKeys } from "lib/components/icon"; +import { InformationFooter } from "./InformationFooter"; + interface SocialMenuType { url: string; icon: IconKeys; @@ -89,30 +92,6 @@ const SocialMenuRender = ({ ); -const AllesFeedback = () => ( - track(AmpEvent.FEEDBACK)} - > - - - - Feedback - - - -); - const IconLink = ({ href, icon, @@ -163,6 +142,7 @@ const IconLink = ({ const Footer = () => { const isThemed = CURR_THEME.footer; + const isMobile = useMobile(); return isThemed ? ( { /> - + {isMobile && } ) : ( { > - { text1="Made by" text2="Alles Labs" /> + {isMobile && } ); }; diff --git a/src/lib/layout/InformationFooter.tsx b/src/lib/layout/InformationFooter.tsx new file mode 100644 index 000000000..fb8bf1398 --- /dev/null +++ b/src/lib/layout/InformationFooter.tsx @@ -0,0 +1,68 @@ +import { Flex, Skeleton, Text } from "@chakra-ui/react"; +import Link from "next/link"; + +import { FeedbackLink } from "lib/components/FeedbackLink"; +import { CustomIcon } from "lib/components/icon"; +import { useOverviewsStats } from "lib/services/overviewService"; + +export const InformationFooter = () => { + const { data: overviewsStats, isLoading } = useOverviewsStats(); + + return ( + + {isLoading ? ( + + ) : ( + + + + {overviewsStats?.latestBlock.toString()} + + + + )} + + + + + + View Doc + + + + + + + ); +}; diff --git a/src/lib/layout/navbar/Expand.tsx b/src/lib/layout/navbar/Expand.tsx index 6a628bde7..97f25d533 100644 --- a/src/lib/layout/navbar/Expand.tsx +++ b/src/lib/layout/navbar/Expand.tsx @@ -11,6 +11,7 @@ import { Text, } from "@chakra-ui/react"; +import { InformationFooter } from "../InformationFooter"; import { AmpEvent, track } from "lib/amplitude"; import { useNavContext } from "lib/app-provider"; import { AppLink } from "lib/components/AppLink"; @@ -171,7 +172,6 @@ export const ExpandNavMenu = ({ {yourAccountMenu.category} - - - - {restNavMenu.map((item) => ( - + + + + {yourAccountMenu.category} + + + + - ))} + {restNavMenu.map((item) => ( + + ))} + - + ); }; diff --git a/src/lib/pages/account-details/index.tsx b/src/lib/pages/account-details/index.tsx index 45be89877..f97a8972a 100644 --- a/src/lib/pages/account-details/index.tsx +++ b/src/lib/pages/account-details/index.tsx @@ -27,6 +27,7 @@ import { CustomTab } from "lib/components/CustomTab"; import { CustomIcon } from "lib/components/icon"; import PageContainer from "lib/components/PageContainer"; import { InvalidState } from "lib/components/state"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import { useFormatAddresses } from "lib/hooks/useFormatAddresses"; import { useAccountData } from "lib/services/accountService"; import { useModulesByAddress } from "lib/services/move/moduleService"; @@ -407,12 +408,27 @@ const AccountDetailsBody = ({ )} /> )} + + + @@ -423,6 +439,11 @@ const AccountDetailsBody = ({ scrollComponentId={tableHeaderId} refetchCount={refetchCounts} /> + + + + + diff --git a/src/lib/pages/admin/index.tsx b/src/lib/pages/admin/index.tsx index 038635a5d..3c96a0d2f 100644 --- a/src/lib/pages/admin/index.tsx +++ b/src/lib/pages/admin/index.tsx @@ -20,6 +20,7 @@ import { ErrorMessageRender } from "lib/components/ErrorMessageRender"; import { EstimatedFeeRender } from "lib/components/EstimatedFeeRender"; import type { FormStatus } from "lib/components/forms"; import { TextInput } from "lib/components/forms"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import WasmPageContainer from "lib/components/WasmPageContainer"; import { useTxBroadcast } from "lib/providers/tx-broadcast"; import { useContractDetailByContractAddress } from "lib/services/contractService"; @@ -169,9 +170,16 @@ const UpdateAdmin = () => { return ( - - Update Admin - + + + Update Admin + + + { diff --git a/src/lib/pages/blocks/index.tsx b/src/lib/pages/blocks/index.tsx index 5dca24996..3bdfe9fed 100644 --- a/src/lib/pages/blocks/index.tsx +++ b/src/lib/pages/blocks/index.tsx @@ -19,7 +19,7 @@ const BlocksPage = () => { diff --git a/src/lib/pages/code-details/index.tsx b/src/lib/pages/code-details/index.tsx index 7ff229d04..eb922eff5 100644 --- a/src/lib/pages/code-details/index.tsx +++ b/src/lib/pages/code-details/index.tsx @@ -112,7 +112,7 @@ const CodeDetailsBody = observer(({ codeId, tab }: CodeDetailsBodyProps) => { @@ -124,7 +124,7 @@ const CodeDetailsBody = observer(({ codeId, tab }: CodeDetailsBodyProps) => { diff --git a/src/lib/pages/codes/index.tsx b/src/lib/pages/codes/index.tsx index 50bef9654..cbdc68ccc 100644 --- a/src/lib/pages/codes/index.tsx +++ b/src/lib/pages/codes/index.tsx @@ -37,7 +37,7 @@ const RecentCodes = observer(() => { @@ -236,7 +236,7 @@ const ContractDetailsBody = observer( @@ -244,7 +244,7 @@ const ContractDetailsBody = observer( @@ -252,7 +252,7 @@ const ContractDetailsBody = observer( @@ -260,7 +260,7 @@ const ContractDetailsBody = observer( diff --git a/src/lib/pages/contract-list/index.tsx b/src/lib/pages/contract-list/index.tsx index e12a66f63..9d0d7cc92 100644 --- a/src/lib/pages/contract-list/index.tsx +++ b/src/lib/pages/contract-list/index.tsx @@ -9,6 +9,7 @@ import { CustomIcon } from "lib/components/icon"; import { CreateNewListModal } from "lib/components/modal"; import PageContainer from "lib/components/PageContainer"; import { AllContractLists } from "lib/components/select-contract"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import { useInstantiatedMockInfoByMe } from "lib/model/contract"; import { useContractStore } from "lib/providers/store"; @@ -50,6 +51,11 @@ const AllContractListsPage = observer(() => { isReadOnly={false} /> + ); }); diff --git a/src/lib/pages/contract-list/slug.tsx b/src/lib/pages/contract-list/slug.tsx index 90471ec91..7a4136243 100644 --- a/src/lib/pages/contract-list/slug.tsx +++ b/src/lib/pages/contract-list/slug.tsx @@ -21,6 +21,7 @@ import { } from "lib/components/modal"; import PageContainer from "lib/components/PageContainer"; import { ContractListDetail } from "lib/components/select-contract"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import { INSTANTIATED_LIST_NAME, SAVED_LIST_NAME } from "lib/data"; import { useInstantiatedByMe } from "lib/model/contract"; import { useContractStore } from "lib/providers/store"; @@ -100,7 +101,14 @@ const ContractsByList = observer(() => { {contractListInfo.name} - + + {isInstantiatedByMe && ( + + )} {isInstantiatedByMe ? ( - ); }; diff --git a/src/lib/pages/execute/index.tsx b/src/lib/pages/execute/index.tsx index 3087df681..d26489e75 100644 --- a/src/lib/pages/execute/index.tsx +++ b/src/lib/pages/execute/index.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Flex, Heading } from "@chakra-ui/react"; +import { Button, Flex, Heading } from "@chakra-ui/react"; import type { Coin } from "@cosmjs/stargate"; import { useRouter } from "next/router"; import { useCallback, useEffect, useState } from "react"; @@ -9,6 +9,7 @@ import { ConnectWalletAlert } from "lib/components/ConnectWalletAlert"; import { ContractSelectSection } from "lib/components/ContractSelectSection"; import { CustomIcon } from "lib/components/icon"; import PageContainer from "lib/components/PageContainer"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import type { ContractDetail } from "lib/services/contractService"; import type { BechAddr32 } from "lib/types"; import { @@ -98,24 +99,22 @@ const Execute = () => { Execute Contract - - - + - { sx={{ "& > div": { zIndex: 1 } }} > - - - {prettyName} - {" "} - Overview - + + + + {prettyName} + {" "} + Overview + + + { DEPLOY NEW CONTRACT - - Instantiate new contract - + + + Instantiate new contract + + + - - Migrate Options - + + + Migrate Options + + + + {address && !isAllowed && ( { return ( - - Past Transactions - + + + Past Transactions + + + { diff --git a/src/lib/pages/pools/poolId.tsx b/src/lib/pages/pools/poolId.tsx index 3e62ec024..b6e425eaf 100644 --- a/src/lib/pages/pools/poolId.tsx +++ b/src/lib/pages/pools/poolId.tsx @@ -5,6 +5,7 @@ import { AmpEvent, track } from "lib/amplitude"; import { useInternalNavigate, usePoolConfig } from "lib/app-provider"; import { Loading } from "lib/components/Loading"; import PageContainer from "lib/components/PageContainer"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import { getFirstQueryParam } from "lib/utils"; import { @@ -32,6 +33,11 @@ export const PoolId = () => { + ); }; diff --git a/src/lib/pages/proposal-details/index.tsx b/src/lib/pages/proposal-details/index.tsx index a09bd8f79..2682c7f1d 100644 --- a/src/lib/pages/proposal-details/index.tsx +++ b/src/lib/pages/proposal-details/index.tsx @@ -79,9 +79,9 @@ const ProposalDetailsBody = ({ id, tab }: ProposalDetailsQueryParams) => { isLoading={isVotesInfoLoading || isParamsLoading} /> @@ -92,9 +92,9 @@ const ProposalDetailsBody = ({ id, tab }: ProposalDetailsQueryParams) => { isLoading={isVotesInfoLoading || isParamsLoading} /> diff --git a/src/lib/pages/proposals/index.tsx b/src/lib/pages/proposals/index.tsx index 3139d9608..d38c4c310 100644 --- a/src/lib/pages/proposals/index.tsx +++ b/src/lib/pages/proposals/index.tsx @@ -103,7 +103,7 @@ const Proposals = () => { diff --git a/src/lib/pages/query/index.tsx b/src/lib/pages/query/index.tsx index a5434cd23..01ff32a53 100644 --- a/src/lib/pages/query/index.tsx +++ b/src/lib/pages/query/index.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Flex, Heading } from "@chakra-ui/react"; +import { Button, Flex, Heading } from "@chakra-ui/react"; import { observer } from "mobx-react-lite"; import { useRouter } from "next/router"; import { useCallback, useEffect, useState } from "react"; @@ -12,6 +12,7 @@ import { import { ContractSelectSection } from "lib/components/ContractSelectSection"; import { CustomIcon } from "lib/components/icon"; import PageContainer from "lib/components/PageContainer"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import type { ContractDetail } from "lib/services/contractService"; import type { BechAddr32 } from "lib/types"; import { @@ -79,20 +80,20 @@ const Query = observer(() => { Query Contract - {!isMobile && ( - + + + {!isMobile && ( - - )} + )} + { ) : ( } /> )} + ); }); diff --git a/src/lib/pages/saved-codes/index.tsx b/src/lib/pages/saved-codes/index.tsx index 811eb9de1..01bc4d743 100644 --- a/src/lib/pages/saved-codes/index.tsx +++ b/src/lib/pages/saved-codes/index.tsx @@ -11,6 +11,7 @@ import { FilterByPermission } from "lib/components/forms"; import InputWithIcon from "lib/components/InputWithIcon"; import PageContainer from "lib/components/PageContainer"; import { MySavedCodesTable } from "lib/components/table"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import type { PermissionFilterValue } from "lib/hooks"; import { useMyCodesData } from "lib/model/code"; @@ -99,6 +100,11 @@ const SavedCodes = observer(() => { isLoading={isSavedCodesLoading} onRowSelect={onRowSelect} /> + ); }); diff --git a/src/lib/pages/stored-codes/index.tsx b/src/lib/pages/stored-codes/index.tsx index 92b44bd2e..21776b11a 100644 --- a/src/lib/pages/stored-codes/index.tsx +++ b/src/lib/pages/stored-codes/index.tsx @@ -15,6 +15,7 @@ import { FilterByPermission } from "lib/components/forms"; import InputWithIcon from "lib/components/InputWithIcon"; import PageContainer from "lib/components/PageContainer"; import { MyStoredCodesTable } from "lib/components/table"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import type { PermissionFilterValue } from "lib/hooks"; import { useMyCodesData } from "lib/model/code"; import { useUploadAccessParams } from "lib/services/proposalService"; @@ -81,25 +82,32 @@ const StoredCodes = observer(() => { {storedCodesCount} - - {isPermissionedNetwork ? ( - <> - - {govConfig.enabled && - !( - govConfig.disableStoreCodeProposal || - govConfig.hideOpenProposal - ) && } - - ) : ( - - )} - + + + + {isPermissionedNetwork ? ( + <> + + {govConfig.enabled && + !( + govConfig.disableStoreCodeProposal || + govConfig.hideOpenProposal + ) && } + + ) : ( + + )} + + { diff --git a/src/lib/pages/txs/index.tsx b/src/lib/pages/txs/index.tsx index 235594439..ffa1c26a5 100644 --- a/src/lib/pages/txs/index.tsx +++ b/src/lib/pages/txs/index.tsx @@ -20,7 +20,7 @@ const Txs = () => { title="Transactions" subtitle="This page displays all transactions on this network sorted by recency" - docHref="user/introduction/block-explorer#recent-transactions" + docHref="introduction/block-explorer#recent-transactions" /> diff --git a/src/lib/pages/upload/upload.tsx b/src/lib/pages/upload/upload.tsx index 150b9d389..1ee85d6e1 100644 --- a/src/lib/pages/upload/upload.tsx +++ b/src/lib/pages/upload/upload.tsx @@ -1,4 +1,4 @@ -import { Heading, Text } from "@chakra-ui/react"; +import { Flex, Heading, Text } from "@chakra-ui/react"; import { useRouter } from "next/router"; import { useEffect } from "react"; @@ -8,6 +8,7 @@ import { useCurrentChain, useInternalNavigate } from "lib/app-provider"; import { ConnectWalletAlert } from "lib/components/ConnectWalletAlert"; import { Stepper } from "lib/components/stepper"; import { UploadSection } from "lib/components/upload/UploadSection"; +import { UserDocsLink } from "lib/components/UserDocsLink"; import WasmPageContainer from "lib/components/WasmPageContainer"; import { useUploadAccessParams } from "lib/services/proposalService"; import { AccessConfigPermission } from "lib/types"; @@ -42,9 +43,16 @@ export const Upload = ({ DEPLOY NEW CONTRACT - - Upload Wasm file - + + + Upload Wasm file + + + { Date: Wed, 27 Mar 2024 11:01:09 +0700 Subject: [PATCH 4/9] fix(components): fix doc link --- src/lib/layout/InformationFooter.tsx | 2 +- src/lib/pages/home/index.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/layout/InformationFooter.tsx b/src/lib/layout/InformationFooter.tsx index d2e74fde8..7266a4c47 100644 --- a/src/lib/layout/InformationFooter.tsx +++ b/src/lib/layout/InformationFooter.tsx @@ -43,7 +43,7 @@ export const InformationFooter = () => { )} diff --git a/src/lib/pages/home/index.tsx b/src/lib/pages/home/index.tsx index 386182bd4..357e21eaf 100644 --- a/src/lib/pages/home/index.tsx +++ b/src/lib/pages/home/index.tsx @@ -88,7 +88,11 @@ const Home = () => { {" "} Overview - + Date: Wed, 27 Mar 2024 17:57:46 +0700 Subject: [PATCH 5/9] fix(components): fix doc path --- src/lib/components/UserDocsLink.tsx | 2 +- src/lib/layout/InformationFooter.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/UserDocsLink.tsx b/src/lib/components/UserDocsLink.tsx index d9ff0a7c9..0075a4995 100644 --- a/src/lib/components/UserDocsLink.tsx +++ b/src/lib/components/UserDocsLink.tsx @@ -5,7 +5,7 @@ import { trackWebsite } from "lib/amplitude"; import { CustomIcon } from "./icon"; -const BASE_LINK = "https://docs.alleslabs.com/user/"; +const BASE_LINK = "https://docs.alleslabs.com/user-guide/"; interface UserDocsLinkProps { href?: string; diff --git a/src/lib/layout/InformationFooter.tsx b/src/lib/layout/InformationFooter.tsx index 7266a4c47..a58eed66b 100644 --- a/src/lib/layout/InformationFooter.tsx +++ b/src/lib/layout/InformationFooter.tsx @@ -43,7 +43,7 @@ export const InformationFooter = () => { )} From 3119dfb4168dbcda74a7b8609bc8b95d56773eca Mon Sep 17 00:00:00 2001 From: songwongtp <16089160+songwongtp@users.noreply.github.com> Date: Wed, 27 Mar 2024 18:08:37 +0700 Subject: [PATCH 6/9] fix: refactor --- src/lib/components/PageHeader.tsx | 5 +- src/lib/components/UserDocsLink.tsx | 9 +-- src/lib/data/constant.ts | 2 + src/lib/layout/Footer.tsx | 7 +- src/lib/layout/InformationFooter.tsx | 115 ++++++++++++++------------- src/lib/layout/navbar/Expand.tsx | 4 +- src/lib/pages/codes/index.tsx | 6 +- 7 files changed, 75 insertions(+), 73 deletions(-) diff --git a/src/lib/components/PageHeader.tsx b/src/lib/components/PageHeader.tsx index 6262afbdd..a60cc82e4 100644 --- a/src/lib/components/PageHeader.tsx +++ b/src/lib/components/PageHeader.tsx @@ -9,11 +9,12 @@ interface PageHeaderProps { subtitle: string; docHref: string; } + export const PageHeader = ({ title, subtitle, docHref }: PageHeaderProps) => { const isMobile = useMobile(); return ( - +
{ {subtitle} - +
{!isMobile && }
); diff --git a/src/lib/components/UserDocsLink.tsx b/src/lib/components/UserDocsLink.tsx index d9ff0a7c9..42543a612 100644 --- a/src/lib/components/UserDocsLink.tsx +++ b/src/lib/components/UserDocsLink.tsx @@ -2,11 +2,10 @@ import { Button, Flex, Text } from "@chakra-ui/react"; import Link from "next/link"; import { trackWebsite } from "lib/amplitude"; +import { DOCS_LINK } from "lib/data"; import { CustomIcon } from "./icon"; -const BASE_LINK = "https://docs.alleslabs.com/user/"; - interface UserDocsLinkProps { href?: string; title?: string; @@ -26,9 +25,9 @@ export const UserDocsLink = ({ }: UserDocsLinkProps) => isButton ? ( { - trackWebsite(`${BASE_LINK}/${href}`); + trackWebsite(`${DOCS_LINK}/${href}`); e.stopPropagation(); }} target="_blank" @@ -58,7 +57,7 @@ export const UserDocsLink = ({ )} diff --git a/src/lib/data/constant.ts b/src/lib/data/constant.ts index bffee8350..bf3aba3d1 100644 --- a/src/lib/data/constant.ts +++ b/src/lib/data/constant.ts @@ -12,6 +12,8 @@ import { MsgType } from "lib/types"; */ import { formatSlugName } from "lib/utils/format"; +export const DOCS_LINK = "https://docs.alleslabs.com/user"; + export const INSTANTIATED_LIST_NAME = "Instantiated by me"; export const SAVED_LIST_NAME = "Saved Contracts"; diff --git a/src/lib/layout/Footer.tsx b/src/lib/layout/Footer.tsx index bba595139..73de3e192 100644 --- a/src/lib/layout/Footer.tsx +++ b/src/lib/layout/Footer.tsx @@ -141,9 +141,8 @@ const IconLink = ({ ); const Footer = () => { - const isThemed = CURR_THEME.footer; const isMobile = useMobile(); - return isThemed ? ( + return CURR_THEME.footer ? ( { target="_blank" rel="noopener noreferrer" > - + @@ -172,7 +171,7 @@ const Footer = () => { color="gray.400" textAlign={{ base: "center", md: "left" }} > - {isThemed.description} + {CURR_THEME.footer.description} trackWebsite(`${DOCS_LINK}/introduction/user-introduction`), + }, + { + href: "https://feedback.alleslabs.com", + icon: "feedback" as IconKeys, + text: "Feedback", + onClick: () => track(AmpEvent.FEEDBACK), + }, +]; + export const InformationFooter = () => { const { data: overviewsStats, isLoading } = useOverviewsStats(); @@ -24,67 +41,51 @@ export const InformationFooter = () => { - {overviewsStats?.latestBlock.toString()} + {overviewsStats?.latestBlock ?? "N/A"} - + {overviewsStats && ( + + )} )} - - - - - View Doc - - - - track(AmpEvent.FEEDBACK)} - > - ( + - - - Feedback - - - + + + + {text} + + + + ))} ); diff --git a/src/lib/layout/navbar/Expand.tsx b/src/lib/layout/navbar/Expand.tsx index b44f186b8..99a301cea 100644 --- a/src/lib/layout/navbar/Expand.tsx +++ b/src/lib/layout/navbar/Expand.tsx @@ -175,7 +175,7 @@ export const ExpandNavMenu = ({ py={2} overflowY="auto" > - +
{yourAccountMenu.category} @@ -201,7 +201,7 @@ export const ExpandNavMenu = ({ isCurrentPage={isCurrentPage} /> ))} - +
); diff --git a/src/lib/pages/codes/index.tsx b/src/lib/pages/codes/index.tsx index cbdc68ccc..7651f8187 100644 --- a/src/lib/pages/codes/index.tsx +++ b/src/lib/pages/codes/index.tsx @@ -1,4 +1,4 @@ -import { Flex } from "@chakra-ui/react"; +import { Box } from "@chakra-ui/react"; import { observer } from "mobx-react-lite"; import { useRouter } from "next/router"; import { useEffect } from "react"; @@ -39,7 +39,7 @@ const RecentCodes = observer(() => { subtitle="This page displays all codes on this network sorted by recency" docHref="introduction/block-explorer#recent-codes" /> - + { setValue("permissionValue", newVal); }} /> - + ); From 08c51bdcdc96346419e2834bdd4d489f31967da3 Mon Sep 17 00:00:00 2001 From: Jennie Alles Date: Wed, 27 Mar 2024 18:20:30 +0700 Subject: [PATCH 7/9] fix(components): fix constant --- src/lib/layout/InformationFooter.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/layout/InformationFooter.tsx b/src/lib/layout/InformationFooter.tsx index cae7b4fb2..feea3e56c 100644 --- a/src/lib/layout/InformationFooter.tsx +++ b/src/lib/layout/InformationFooter.tsx @@ -8,7 +8,7 @@ import { CustomIcon } from "lib/components/icon"; import { DOCS_LINK } from "lib/data"; import { useOverviewsStats } from "lib/services/overviewService"; -const footerButtons = [ +const FOOTER_BUTTONS = [ { href: `${DOCS_LINK}/introduction/user-introduction`, icon: "document" as IconKeys, @@ -61,7 +61,7 @@ export const InformationFooter = () => {
)} - {footerButtons.map(({ href, icon, text, onClick }) => ( + {FOOTER_BUTTONS.map(({ href, icon, text, onClick }) => ( Date: Wed, 27 Mar 2024 18:56:10 +0700 Subject: [PATCH 8/9] fix: remove initial from module publisher --- src/lib/pages/module-details/components/ModuleInfo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/pages/module-details/components/ModuleInfo.tsx b/src/lib/pages/module-details/components/ModuleInfo.tsx index 372067d3e..8cad7cd1e 100644 --- a/src/lib/pages/module-details/components/ModuleInfo.tsx +++ b/src/lib/pages/module-details/components/ModuleInfo.tsx @@ -136,7 +136,7 @@ const ModuleInfoBody = ({ "N/A" )} - + Date: Thu, 28 Mar 2024 13:01:12 +0700 Subject: [PATCH 9/9] fix: revert initial publish --- src/lib/pages/module-details/components/ModuleInfo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/pages/module-details/components/ModuleInfo.tsx b/src/lib/pages/module-details/components/ModuleInfo.tsx index 8cad7cd1e..372067d3e 100644 --- a/src/lib/pages/module-details/components/ModuleInfo.tsx +++ b/src/lib/pages/module-details/components/ModuleInfo.tsx @@ -136,7 +136,7 @@ const ModuleInfoBody = ({ "N/A" )} - +