diff --git a/src/assets/icons/ico/legendComparisoPrevious.svg b/src/assets/icons/ico/legendComparisoPrevious.svg deleted file mode 100644 index 8523b05083cd712bca5edd07711ac90236b7500b..0000000000000000000000000000000000000000 --- a/src/assets/icons/ico/legendComparisoPrevious.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"> - <path fill-rule="evenodd" clip-rule="evenodd" - d="M0 -0.75C0.552285 -0.75 1 -1.19772 1 -1.75C1 -2.30228 0.552285 -2.75 0 -2.75C-0.552285 -2.75 -1 -2.30228 -1 -1.75C-1 -1.19772 -0.552285 -0.75 0 -0.75ZM4 -0.75C4.55228 -0.75 5 -1.19772 5 -1.75C5 -2.30228 4.55228 -2.75 4 -2.75C3.44772 -2.75 3 -2.30228 3 -1.75C3 -1.19772 3.44772 -0.75 4 -0.75ZM9 -1.75C9 -1.19772 8.55229 -0.75 8 -0.75C7.44771 -0.75 7 -1.19772 7 -1.75C7 -2.30228 7.44771 -2.75 8 -2.75C8.55229 -2.75 9 -2.30228 9 -1.75ZM12 -0.75C12.5523 -0.75 13 -1.19772 13 -1.75C13 -2.30228 12.5523 -2.75 12 -2.75C11.4477 -2.75 11 -2.30228 11 -1.75C11 -1.19772 11.4477 -0.75 12 -0.75ZM17 -1.75C17 -1.19772 16.5523 -0.75 16 -0.75C15.4477 -0.75 15 -1.19772 15 -1.75C15 -2.30228 15.4477 -2.75 16 -2.75C16.5523 -2.75 17 -2.30228 17 -1.75ZM0 3.25C0.552285 3.25 1 2.80228 1 2.25C1 1.69772 0.552285 1.25 0 1.25C-0.552285 1.25 -1 1.69772 -1 2.25C-1 2.80228 -0.552285 3.25 0 3.25ZM5 2.25C5 2.80228 4.55228 3.25 4 3.25C3.44772 3.25 3 2.80228 3 2.25C3 1.69772 3.44772 1.25 4 1.25C4.55228 1.25 5 1.69772 5 2.25ZM8 3.25C8.55229 3.25 9 2.80228 9 2.25C9 1.69772 8.55229 1.25 8 1.25C7.44771 1.25 7 1.69772 7 2.25C7 2.80228 7.44771 3.25 8 3.25ZM13 2.25C13 2.80228 12.5523 3.25 12 3.25C11.4477 3.25 11 2.80228 11 2.25C11 1.69772 11.4477 1.25 12 1.25C12.5523 1.25 13 1.69772 13 2.25ZM16 3.25C16.5523 3.25 17 2.80228 17 2.25C17 1.69772 16.5523 1.25 16 1.25C15.4477 1.25 15 1.69772 15 2.25C15 2.80228 15.4477 3.25 16 3.25ZM1 6.25C1 6.80229 0.552285 7.25 0 7.25C-0.552285 7.25 -1 6.80229 -1 6.25C-1 5.69771 -0.552285 5.25 0 5.25C0.552285 5.25 1 5.69771 1 6.25ZM4 7.25C4.55228 7.25 5 6.80229 5 6.25C5 5.69771 4.55228 5.25 4 5.25C3.44772 5.25 3 5.69771 3 6.25C3 6.80229 3.44772 7.25 4 7.25ZM9 6.25C9 6.80229 8.55229 7.25 8 7.25C7.44771 7.25 7 6.80229 7 6.25C7 5.69771 7.44771 5.25 8 5.25C8.55229 5.25 9 5.69771 9 6.25ZM12 7.25C12.5523 7.25 13 6.80229 13 6.25C13 5.69771 12.5523 5.25 12 5.25C11.4477 5.25 11 5.69771 11 6.25C11 6.80229 11.4477 7.25 12 7.25ZM17 6.25C17 6.80229 16.5523 7.25 16 7.25C15.4477 7.25 15 6.80229 15 6.25C15 5.69771 15.4477 5.25 16 5.25C16.5523 5.25 17 5.69771 17 6.25ZM0 11.25C0.552285 11.25 1 10.8023 1 10.25C1 9.69771 0.552285 9.25 0 9.25C-0.552285 9.25 -1 9.69771 -1 10.25C-1 10.8023 -0.552285 11.25 0 11.25ZM5 10.25C5 10.8023 4.55228 11.25 4 11.25C3.44772 11.25 3 10.8023 3 10.25C3 9.69771 3.44772 9.25 4 9.25C4.55228 9.25 5 9.69771 5 10.25ZM8 11.25C8.55229 11.25 9 10.8023 9 10.25C9 9.69771 8.55229 9.25 8 9.25C7.44771 9.25 7 9.69771 7 10.25C7 10.8023 7.44771 11.25 8 11.25ZM13 10.25C13 10.8023 12.5523 11.25 12 11.25C11.4477 11.25 11 10.8023 11 10.25C11 9.69771 11.4477 9.25 12 9.25C12.5523 9.25 13 9.69771 13 10.25ZM16 11.25C16.5523 11.25 17 10.8023 17 10.25C17 9.69771 16.5523 9.25 16 9.25C15.4477 9.25 15 9.69771 15 10.25C15 10.8023 15.4477 11.25 16 11.25ZM1 14.25C1 14.8023 0.552285 15.25 0 15.25C-0.552285 15.25 -1 14.8023 -1 14.25C-1 13.6977 -0.552285 13.25 0 13.25C0.552285 13.25 1 13.6977 1 14.25ZM4 15.25C4.55228 15.25 5 14.8023 5 14.25C5 13.6977 4.55228 13.25 4 13.25C3.44772 13.25 3 13.6977 3 14.25C3 14.8023 3.44772 15.25 4 15.25ZM9 14.25C9 14.8023 8.55229 15.25 8 15.25C7.44771 15.25 7 14.8023 7 14.25C7 13.6977 7.44771 13.25 8 13.25C8.55229 13.25 9 13.6977 9 14.25ZM12 15.25C12.5523 15.25 13 14.8023 13 14.25C13 13.6977 12.5523 13.25 12 13.25C11.4477 13.25 11 13.6977 11 14.25C11 14.8023 11.4477 15.25 12 15.25ZM17 14.25C17 14.8023 16.5523 15.25 16 15.25C15.4477 15.25 15 14.8023 15 14.25C15 13.6977 15.4477 13.25 16 13.25C16.5523 13.25 17 13.6977 17 14.25ZM0 19.25C0.552285 19.25 1 18.8023 1 18.25C1 17.6977 0.552285 17.25 0 17.25C-0.552285 17.25 -1 17.6977 -1 18.25C-1 18.8023 -0.552285 19.25 0 19.25ZM5 18.25C5 18.8023 4.55228 19.25 4 19.25C3.44772 19.25 3 18.8023 3 18.25C3 17.6977 3.44772 17.25 4 17.25C4.55228 17.25 5 17.6977 5 18.25ZM8 19.25C8.55229 19.25 9 18.8023 9 18.25C9 17.6977 8.55229 17.25 8 17.25C7.44771 17.25 7 17.6977 7 18.25C7 18.8023 7.44771 19.25 8 19.25ZM13 18.25C13 18.8023 12.5523 19.25 12 19.25C11.4477 19.25 11 18.8023 11 18.25C11 17.6977 11.4477 17.25 12 17.25C12.5523 17.25 13 17.6977 13 18.25ZM16 19.25C16.5523 19.25 17 18.8023 17 18.25C17 17.6977 16.5523 17.25 16 17.25C15.4477 17.25 15 17.6977 15 18.25C15 18.8023 15.4477 19.25 16 19.25Z" - fill="currentColor" /> -</svg> \ No newline at end of file diff --git a/src/components/Consumption/ChartCompare/ChartCompare.scss b/src/components/Consumption/ChartCompare/ChartCompare.scss index ecf8f0ae4fe8cad75a22887021c20696631b3a40..46a616a4e79d6ffe9fb9312e5932b50c490c7137 100644 --- a/src/components/Consumption/ChartCompare/ChartCompare.scss +++ b/src/components/Consumption/ChartCompare/ChartCompare.scss @@ -40,7 +40,6 @@ align-items: center; width: 100%; gap: 12px; - .date { text-align: center; } diff --git a/src/components/Consumption/ChartCompare/ChartCompare.tsx b/src/components/Consumption/ChartCompare/ChartCompare.tsx index e8e2114543055ce43b30d0d8757b4cde28d15015..e4fe439ad42e63f07a7eb7c35cd593a2887e12ef 100644 --- a/src/components/Consumption/ChartCompare/ChartCompare.tsx +++ b/src/components/Consumption/ChartCompare/ChartCompare.tsx @@ -7,7 +7,6 @@ import CompareIconGas from 'assets/icons/ico/compare-gas.svg' import CompareIconWater from 'assets/icons/ico/compare-water.svg' import CompareIcon from 'assets/icons/ico/compare.svg' import LegendComparisonIcon from 'assets/icons/ico/legendComparison.svg' -// import LegendComparisonPreviousIcon from 'assets/icons/ico/legendComparisonPrevious.svg' import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import StyledSwitch from 'components/CommonKit/Switch/StyledSwitch' import { useClient } from 'cozy-client' @@ -23,14 +22,7 @@ import { convertDateToShortDateString } from 'utils/date' import { formatNumberValues, getFluidName } from 'utils/utils' import './ChartCompare.scss' -const fluidIcons = [ - { compare: CompareIcon, coin: Coin }, - { compare: CompareIconElec, coin: CoinElec }, - { compare: CompareIconWater, coin: CoinWater }, - { compare: CompareIconGas, coin: CoinGas }, -] - -const fluidMapIcons = { +const fluidIcons = { [FluidType.ELECTRICITY]: { compare: CompareIconElec, coin: CoinElec }, [FluidType.WATER]: { compare: CompareIconWater, coin: CoinWater }, [FluidType.GAS]: { compare: CompareIconGas, coin: CoinGas }, @@ -169,10 +161,7 @@ export const ChartCompare = ({ fluidType }: { fluidType: FluidType }) => { <div className="compareDetails"> <div className="bloc"> - <StyledIcon - icon={fluidMapIcons[fluidType].compare} - size={36} - /> + <StyledIcon icon={fluidIcons[fluidType].compare} size={36} /> <span className="text-24-bold price"> {previousTotalValue} € </span> @@ -187,7 +176,7 @@ export const ChartCompare = ({ fluidType }: { fluidType: FluidType }) => { <div className="bloc"> <StyledIcon className="pile-icon" - icon={fluidMapIcons[fluidType].coin} + icon={fluidIcons[fluidType].coin} size={32} /> <span className="text-24-bold price">{totalValue} €</span>