Skip to content

Commit

Permalink
fixed build issues, added new font, set default to full dollars
Browse files Browse the repository at this point in the history
  • Loading branch information
mokelgit committed Feb 19, 2025
1 parent c3f221e commit 4d36bac
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 28 deletions.
23 changes: 14 additions & 9 deletions app/(fees)/fees/FeesChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { useUIContext } from "@/contexts/UIContext";
import d3 from "d3";
import { FeesLineChart } from "@/types/api/Fees/LineChart";
import { MasterResponse } from "@/types/api/MasterResponse";
import "../../highcharts.axis.css";
import "@/app/highcharts.axis.css";
import { useMaster } from "@/contexts/MasterContext";

const COLORS = {
Expand Down Expand Up @@ -280,7 +280,7 @@ export default function FeesChart({
}"></div>
<div class="tooltip-point-name">${AllChainsByKeys[name].label
}</div>
<div class="flex-1 text-right font-inter">${Highcharts.numberFormat(
<div class="flex-1 text-right numbers-xs ">${Highcharts.numberFormat(
percentage,
2,
)}%</div>
Expand Down Expand Up @@ -357,7 +357,7 @@ export default function FeesChart({
}"></div>
<div class="tooltip-point-name text-md">${AllChainsByKeys[name].label
}</div>
<div class="flex-1 text-right justify-end font-inter flex">
<div class="flex-1 text-right justify-end numbers-sm flex">
<div class="opacity-70 mr-0.5 ${!prefix && "hidden"
}">${prefix}</div>
${selectedMetric === "fdv" || selectedMetric === "market_cap"
Expand Down Expand Up @@ -654,13 +654,18 @@ export default function FeesChart({
showLastLabel={false}
labels={{
align: "left",
y: 11,
x: 3,
y: -1,
x: 2,
useHTML: true,

style: {
color: "rgb(215, 223, 222)",
fontSize: "10px",
fontWeight: "700",
fontFamily: "Fira Sans",
backgroundColor: "transparent",
whiteSpace: "nowrap",
color: "rgb(215, 223, 222)",
fontSize: "10px",
fontWeight: "700",
fontFamily: "var(--font-raleway), sans-serif",

},
formatter: function (
t: Highcharts.AxisLabelsFormatterContextObject,
Expand Down
16 changes: 6 additions & 10 deletions app/(fees)/fees/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export default function FeesPage() {
const [sortOrder, setSortOrder] = useState(true);
//True is default descending false ascending
const [hoverSettings, setHoverSettings] = useState<boolean>(false);
const [showCents, setShowCents] = useLocalStorage("showCents", true);
const [showCents, setShowCents] = useLocalStorage("showCents", false);
const [showUsd, setShowUsd] = useLocalStorage("showUsd", true);
const [allChainsSelect, setAllChainsSelect] = useState(false);
const { theme } = useTheme();
Expand Down Expand Up @@ -1045,7 +1045,7 @@ export default function FeesPage() {
}}
>
{lessThanOverride && (
<div className="h-[12px] w-[12px]">
<div className="h-[12px] w-[12px] relative top-[2px]">
<Icon
icon="feather:chevron-left"
className="h-[12px] w-[12px]"
Expand All @@ -1063,10 +1063,8 @@ export default function FeesPage() {
</div>
)}
<div
className="flex items-center self-center text-[12px] md:text-[12px]"
style={{
fontFeatureSettings: "'pnum' on, 'lnum' on",
}}
className="flex items-center self-center numbers-xs "

>
{lessThanOverride
? lessThanValue
Expand Down Expand Up @@ -1144,10 +1142,8 @@ export default function FeesPage() {
</div>
)}
<div
className="flex items-center self-center text-[12px] md:text-[12px]"
style={{
fontFeatureSettings: "'pnum' on, 'lnum' on",
}}
className="flex items-center self-center numbers-xs"

>
{lessThanOverride
? lessThanValue
Expand Down
12 changes: 3 additions & 9 deletions components/layout/SingleChains/ChainChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import {
metricCategories,
} from "@/lib/metrics";


const COLORS = {
GRID: "rgb(215, 223, 222)",
PLOT_LINE: "rgb(215, 223, 222)",
Expand Down Expand Up @@ -557,14 +558,7 @@ export default function ChainChart({
showGwei(key) && !showUsd
? "Gwei"
: master.metrics[key].units[unitKey].suffix;
let prefix =
showGwei(key) && !showUsd
? ""
: master.metrics[key].units[unitKey].prefix;
let suffix =
showGwei(key) && !showUsd
? "Gwei"
: master.metrics[key].units[unitKey].suffix;

let valueIndex = showUsd ? 1 : 2;
let valueMultiplier = showGwei(key) && !showUsd ? 1000000000 : 1;

Expand Down Expand Up @@ -1489,7 +1483,7 @@ export default function ChainChart({
<div
className={`relative flex rounded-full h-full w-full lg:z-30 p-[5px] cursor-pointer ${
compChain
? AllChainsByKeys[compChain].backgrounds[theme ?? "dark"][0]
? AllChainsByKeys[compChain].colors[theme ?? "dark"][0]
: "bg-white dark:bg-[#151A19]"
} ${isMobile ? "w-full" : "w-[271px]"} `}
>
Expand Down

0 comments on commit 4d36bac

Please sign in to comment.