diff --git a/src/components/atoms/Tooltip/styles.scss b/src/components/atoms/Tooltip/styles.scss index 4039810a..c3b42c8b 100644 --- a/src/components/atoms/Tooltip/styles.scss +++ b/src/components/atoms/Tooltip/styles.scss @@ -19,8 +19,8 @@ &.info { margin: 0 16px; - max-width: 100vw; - max-width: 100svw; + max-width: calc(100vw - 32px); + max-width: calc(100svw - 32px); padding: 12px 16px; } diff --git a/src/pages/Governor/index.tsx b/src/pages/Governor/index.tsx index 708d3ada..bffa4998 100644 --- a/src/pages/Governor/index.tsx +++ b/src/pages/Governor/index.tsx @@ -5,7 +5,7 @@ import analytics from "src/analytics"; import { useEnvironment } from "src/context/EnvironmentContext"; import { BREAKPOINTS, MORE_INFO_GOVERNOR_URL } from "src/consts"; import { BaseLayout } from "src/layouts/BaseLayout"; -import { BlockchainIcon, NavLink, Select, Tooltip } from "src/components/atoms"; +import { BlockchainIcon, NavLink, Select, ToggleGroup, Tooltip } from "src/components/atoms"; import { Table } from "src/components/organisms"; import { getChainName } from "src/utils/wormhole"; import { formatNumber } from "src/utils/number"; @@ -71,10 +71,10 @@ const Governor = () => { const [dataTransactions, setDataTransactions] = useState([]); const [openSortBy, setOpenSortBy] = useState(false); const [selectedSortBy, setSelectedSortBy] = useState( - showTransactions ? SORT_TRANSACTIONS_BY_LIST[4] : SORT_DASHBOARD_BY_LIST[2], + showTransactions ? SORT_TRANSACTIONS_BY_LIST[4] : SORT_DASHBOARD_BY_LIST[3], ); const [selectedSortLowHigh, setSelectedSortLowHigh] = useState( - showTransactions ? SORT_LOW_HIGH_LIST[0] : SORT_LOW_HIGH_LIST[1], + showTransactions ? SORT_LOW_HIGH_LIST[0] : SORT_LOW_HIGH_LIST[0], ); const [sortBy, setSortBy] = useState<{ id: string; desc: boolean }[]>([ { id: selectedSortBy.value, desc: selectedSortLowHigh.value }, @@ -312,9 +312,9 @@ const Governor = () => { setSelectedSortLowHigh(SORT_LOW_HIGH_LIST[0]); setSortBy([{ id: SORT_TRANSACTIONS_BY_LIST[4].value, desc: false }]); } else { - setSelectedSortBy(SORT_DASHBOARD_BY_LIST[2]); - setSelectedSortLowHigh(SORT_LOW_HIGH_LIST[1]); - setSortBy([{ id: SORT_DASHBOARD_BY_LIST[2].value, desc: true }]); + setSelectedSortBy(SORT_DASHBOARD_BY_LIST[3]); + setSelectedSortLowHigh(SORT_LOW_HIGH_LIST[0]); + setSortBy([{ id: SORT_DASHBOARD_BY_LIST[3].value, desc: false }]); } setOpenSortBy(false); }; @@ -344,32 +344,25 @@ const Governor = () => {
-
- - - -
+ { + setShowTransactions(value === "txs"); + handleReset(value === "txs"); + }} + value={showTransactions ? "txs" : "dashboard"} + />