fix: use array parameter instead of closure for i18n-safe bold styling
This commit is contained in:
1 parent
4ac0f1e87f
commit
87c549960e
2 files changed
+4
-3
No files matched your search
@@ -50,14 +50,14 @@ const GetTooltip = (timings, theme, t) => {
|
|||||||
>
|
>
|
||||||
{t("responseTimeBreakdown")}
|
{t("responseTimeBreakdown")}
|
||||||
</Typography>
|
</Typography>
|
||||||
{timingDetails.map((detail, index) => (
|
{timingDetails.map((detail, index, array) => (
|
||||||
<Box
|
<Box
|
||||||
key={index}
|
key={index}
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
gap: theme.spacing(4),
|
gap: theme.spacing(4),
|
||||||
marginBottom: index < timingDetails.length - 1 ? theme.spacing(0.5) : 0,
|
marginBottom: index < array.length - 1 ? theme.spacing(0.5) : 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -69,7 +69,7 @@ const GetTooltip = (timings, theme, t) => {
|
|||||||
<Typography
|
<Typography
|
||||||
variant="body2"
|
variant="body2"
|
||||||
sx={{
|
sx={{
|
||||||
fontWeight: detail.label === "Total" ? 600 : 400,
|
fontWeight: index === array.length - 1 ? 600 : 400,
|
||||||
color: theme.palette.primary.contrastText,
|
color: theme.palette.primary.contrastText,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
"tlsHandshake": "TLS Handshake",
|
"tlsHandshake": "TLS Handshake",
|
||||||
"waitTime": "Wait Time",
|
"waitTime": "Wait Time",
|
||||||
"timeToFirstByte": "Time to First Byte",
|
"timeToFirstByte": "Time to First Byte",
|
||||||
|
"download": "Download",
|
||||||
"ms": "ms",
|
"ms": "ms",
|
||||||
"bar": "Bar",
|
"bar": "Bar",
|
||||||
"area": "Area",
|
"area": "Area",
|
||||||
|
|||||||
Reference in new issue
Block a user