diff --git a/web/src/features/charts/ProductionSourceLegendList.tsx b/web/src/features/charts/ProductionSourceLegendList.tsx index c17e1fe779..bd75b32bff 100644 --- a/web/src/features/charts/ProductionSourceLegendList.tsx +++ b/web/src/features/charts/ProductionSourceLegendList.tsx @@ -1,8 +1,5 @@ -import TooltipWrapper from 'components/tooltips/TooltipWrapper'; -import { X } from 'lucide-react'; import { twMerge } from 'tailwind-merge'; import { ElectricityModeType } from 'types'; -import { useIsMobile } from 'utils/styling'; import ProductionSourceLegend from './ProductionSourceLegend'; @@ -13,60 +10,19 @@ export default function ProductionSourceLegendList({ sources: ElectricityModeType[]; className?: string; }) { - const isMobile = useIsMobile(); - - return ( - } - tooltipClassName={ - isMobile - ? 'bg-transparent shadow-none border-transparent dark:bg-transparent items-center flex flex-col p-0 mb-2' - : 'rounded-2xl min-w-44 dark:bg-gray-900/80 dark:border-1 dark:border-gray-700 mx-5 backdrop-blur bg-white/80 mb-2' - } - side="bottom" - isMobile={isMobile} - > -
- {sources.map((source, index) => ( - - ))} -
-
- ); -} - -function ProductionSourceTooltip({ - sources, - isMobile, -}: { - sources: ElectricityModeType[]; - isMobile: boolean; -}) { - if (isMobile) { - return ( - <> -
- -
- - - ); - } - - return ; -} - -function ProductionSourceTooltipInner({ sources }: { sources: ElectricityModeType[] }) { return ( -
- {sources.map((source) => ( -
- -
{source}
-
- ))} +
+ {sources.map((source, index) => { + const capitalizedLabel = `${source.charAt(0).toUpperCase()}${source.slice(1)}`; + return ( + + +

+ {capitalizedLabel} +

+
+ ); + })}
); }