diff --git a/app/(layout)/economics/page.tsx b/app/(layout)/economics/page.tsx index 004f2f82..5274e8ca 100644 --- a/app/(layout)/economics/page.tsx +++ b/app/(layout)/economics/page.tsx @@ -57,8 +57,8 @@ export default function Economics() { /> {/*
*/} {/*Data Availability Fee Markets */} - - {econData && } + + {econData && } {econData && master && } {/*
*/} diff --git a/components/layout/Economics/ChainBreakdown.tsx b/components/layout/Economics/ChainBreakdown.tsx index babf50f0..5d74ae50 100644 --- a/components/layout/Economics/ChainBreakdown.tsx +++ b/components/layout/Economics/ChainBreakdown.tsx @@ -19,11 +19,7 @@ import { useTransition, animated } from "@react-spring/web"; import { set, times } from "lodash"; import { useUIContext } from "@/contexts/UIContext"; import HorizontalScrollContainer from "@/components/HorizontalScrollContainer"; -import { - TopRowContainer, - TopRowChild, - TopRowParent, -} from "@/components/layout/TopRow"; + import Container from "../Container"; import { Tooltip, @@ -537,74 +533,7 @@ export default function ChainBreakdown({ - - - { - const isTransferrableTimespan = - selectedTimespan === "max" || selectedTimespan === "365d"; - if (!isTransferrableTimespan) { - setSelectedTimespan("max"); - } - setIsMonthly(false); - }} - style={{ - paddingTop: "10.5px", - paddingBottom: "10.5px", - paddingLeft: "16px", - paddingRight: "16px", - }} - > - {"Daily"} - - { - const isTransferrableTimespan = - selectedTimespan === "max" || selectedTimespan === "365d"; - if (!isTransferrableTimespan) { - setSelectedTimespan("max"); - } - setIsMonthly(true); - }} - style={{ - paddingTop: "10.5px", - paddingBottom: "10.5px", - paddingLeft: "16px", - paddingRight: "16px", - }} - > - {"Monthly"} - - - - {Object.keys(timespans).map((key) => { - { - return ( - { - setSelectedTimespan(key); - }} - key={key} - style={{ - paddingTop: "10.5px", - paddingBottom: "10.5px", - paddingLeft: "16px", - paddingRight: "16px", - }} - isSelected={selectedTimespan === key} - > - {selectedTimespan === key - ? timespans[key].label - : timespans[key].shortLabel} - - ); - } - })} - - + void; isMonthly: boolean; + setIsMonthly: (isMonthly: boolean) => void; }) { const { AllChains, AllChainsByKeys } = useMaster(); const [showUsd, setShowUsd] = useLocalStorage("showUsd", true); @@ -468,7 +478,78 @@ export default function EconHeadCharts({ }, [dataTimestampExtremes.xMax, dataTimestampExtremes.xMin, isMonthly]); return ( -
+
+ + + { + const isTransferrableTimespan = + selectedTimespan === "max" || selectedTimespan === "365d"; + if (!isTransferrableTimespan) { + setSelectedTimespan("max"); + } + setIsMonthly(false); + }} + style={{ + paddingTop: "10.5px", + paddingBottom: "10.5px", + paddingLeft: "16px", + paddingRight: "16px", + }} + > + {"Daily"} + + { + const isTransferrableTimespan = + selectedTimespan === "max" || selectedTimespan === "365d"; + if (!isTransferrableTimespan) { + setSelectedTimespan("max"); + } + setIsMonthly(true); + }} + style={{ + paddingTop: "10.5px", + paddingBottom: "10.5px", + paddingLeft: "16px", + paddingRight: "16px", + }} + > + {"Monthly"} + + + + {Object.keys(timespans).map((key) => { + { + return ( + { + setSelectedTimespan(key); + }} + key={key} + style={{ + paddingTop: "10.5px", + paddingBottom: "10.5px", + paddingLeft: "16px", + paddingRight: "16px", + }} + isSelected={selectedTimespan === key} + > + {selectedTimespan === key + ? timespans[key].label + : timespans[key].shortLabel} + + ); + } + })} + + +
+
); }