@treely/strapi-slices 7.15.1 → 7.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/strapi-slices.cjs.development.js +6 -4
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +6 -4
- package/dist/strapi-slices.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/portfolio/ProjectInfo/ProjectInfo.tsx +39 -33
package/package.json
CHANGED
|
@@ -43,7 +43,6 @@ export const ProjectInfo: React.FC<ProjectInfoProps> = ({
|
|
|
43
43
|
subtitles,
|
|
44
44
|
}: ProjectInfoProps) => {
|
|
45
45
|
const { formatMessage, formatNumber, formatDate } = useContext(IntlContext);
|
|
46
|
-
|
|
47
46
|
return (
|
|
48
47
|
<Container p="2" width="full">
|
|
49
48
|
<Heading size="xl" textAlign="left">
|
|
@@ -208,36 +207,39 @@ export const ProjectInfo: React.FC<ProjectInfoProps> = ({
|
|
|
208
207
|
<></>
|
|
209
208
|
)}
|
|
210
209
|
<SimpleGrid columns={[1, null, null, 2]} spacingX="10" spacingY="8">
|
|
211
|
-
{project.averageSellableAmountPerYear
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
>
|
|
218
|
-
<
|
|
219
|
-
|
|
220
|
-
label
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
project.averageSellableAmountPerYear.toString()
|
|
231
|
-
),
|
|
232
|
-
{ maximumFractionDigits: 0 }
|
|
210
|
+
{project.averageSellableAmountPerYear > 0 ? (
|
|
211
|
+
<Tooltip
|
|
212
|
+
label={formatMessage({
|
|
213
|
+
id: 'features.projectInfo.properties.projectVolume.toolTip',
|
|
214
|
+
})}
|
|
215
|
+
>
|
|
216
|
+
<Box>
|
|
217
|
+
<LabelTextPair
|
|
218
|
+
label={formatMessage({
|
|
219
|
+
id: 'features.projectInfo.properties.projectVolume.label',
|
|
220
|
+
})}
|
|
221
|
+
text={formatMessage(
|
|
222
|
+
{
|
|
223
|
+
id: 'unit.formatter.tonsCo2PerYear',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
number: formatNumber(
|
|
227
|
+
convertCo2AmountKgToTons(
|
|
228
|
+
project.averageSellableAmountPerYear.toString()
|
|
233
229
|
),
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
230
|
+
{ maximumFractionDigits: 0 }
|
|
231
|
+
),
|
|
232
|
+
}
|
|
233
|
+
)}
|
|
234
|
+
caption={subtitles.averageSellableAmountPerYearSubtitle}
|
|
235
|
+
/>
|
|
236
|
+
</Box>
|
|
237
|
+
</Tooltip>
|
|
238
|
+
) : (
|
|
239
|
+
<Box>
|
|
240
|
+
<CreditsAvailableBadge status={project.creditAvailability} />
|
|
241
|
+
</Box>
|
|
242
|
+
)}
|
|
241
243
|
|
|
242
244
|
{project.riskBuffer && (
|
|
243
245
|
<Box>
|
|
@@ -255,9 +257,13 @@ export const ProjectInfo: React.FC<ProjectInfoProps> = ({
|
|
|
255
257
|
)}
|
|
256
258
|
</SimpleGrid>
|
|
257
259
|
|
|
258
|
-
|
|
259
|
-
<
|
|
260
|
-
|
|
260
|
+
{project.averageSellableAmountPerYear > 0 ? (
|
|
261
|
+
<Box mt="2">
|
|
262
|
+
<CreditsAvailableBadge status={project.creditAvailability} />
|
|
263
|
+
</Box>
|
|
264
|
+
) : (
|
|
265
|
+
<></>
|
|
266
|
+
)}
|
|
261
267
|
</Container>
|
|
262
268
|
);
|
|
263
269
|
};
|