Skip to content

Commit

Permalink
Release Sprint 5 v3
Browse files Browse the repository at this point in the history
* B7 - bugs post-MEP : hotfix date mise à jour, et valeur stockage de données
  • Loading branch information
bdavidxyz authored Aug 11, 2023
1 parent 187a412 commit 9f8ac4a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# CHANGELOG


## 1.18.9 (11/08/2023)

* B7 - bugs post-MEP : hotfix date mise à jour, et valeur stockage de données

## 1.18.8 (10/08/2023)

* A22b - affichage des sources
Expand Down
2 changes: 1 addition & 1 deletion src/components/misc/SourceAgribalyse.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function SourceAgribalyse() {
Agribalyse 3.1.1{" "}
</OutboundLink>
<span> - </span>
<span>Mise à jour le 10/10/2023 </span>
<span>Mise à jour le 10/08/2023 </span>
</Wrapper>
);
}
7 changes: 5 additions & 2 deletions src/components/views/equivalent/details/Value.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Emoji from "components/base/Emoji";
import Section from "components/base/Section";
import React from "react";
import styled from "styled-components";
import { getFrenchFormattedNumber, getNumberWithNDigitsAfterComma, formatTotal } from "utils/formatters";
import { getFrenchFormattedNumber, getNumberWithNDigitsAfterComma, formatTotal, formatNumber } from "utils/formatters";

const StyledSection = styled(Section)`
background-color: ${(props) => props.theme.colors.main};
Expand Down Expand Up @@ -54,13 +54,16 @@ const StyledEmoji = styled(Emoji)`
}
`;
export default function Value(props) {
let numberToDisplay = formatTotal(props.equivalent);
return (
<StyledSection>
<Section.Content flex>
<Top>
<div>
<Number>
{getFrenchFormattedNumber(getNumberWithNDigitsAfterComma(formatTotal(props.equivalent), 2))}
{numberToDisplay < 0.02
? formatNumber(formatTotal(props.equivalent))
: getFrenchFormattedNumber(getNumberWithNDigitsAfterComma(formatTotal(props.equivalent), 2))}
</Number>{" "}
<Unit>
kg <Big>CO2</Big>e{" "}
Expand Down

0 comments on commit 9f8ac4a

Please sign in to comment.