Merge pull request #4944 from freesewing/joost
fix(shared): Take units into account for displaying sets. Fixes #4939
This commit is contained in:
commit
3debcc853e
1 changed files with 6 additions and 2 deletions
|
@ -106,7 +106,11 @@ export const NewSet = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MeasieVal = ({ val, m, imperial }) =>
|
export const MeasieVal = ({ val, m, imperial }) =>
|
||||||
isDegreeMeasurement(m) ? <span>{val}°</span> : <span>{formatMm(val, imperial)}</span>
|
isDegreeMeasurement(m) ? (
|
||||||
|
<span>{val}°</span>
|
||||||
|
) : (
|
||||||
|
<span dangerouslySetInnerHTML={{ __html: formatMm(val, imperial) }}></span>
|
||||||
|
)
|
||||||
|
|
||||||
export const MsetCard = ({
|
export const MsetCard = ({
|
||||||
set,
|
set,
|
||||||
|
@ -399,7 +403,7 @@ export const Mset = ({ id, publicOnly = false }) => {
|
||||||
<h2>{t('measies')}</h2>
|
<h2>{t('measies')}</h2>
|
||||||
{Object.entries(mset.measies).map(([m, val]) =>
|
{Object.entries(mset.measies).map(([m, val]) =>
|
||||||
val > 0 ? (
|
val > 0 ? (
|
||||||
<DisplayRow title={<MeasieVal m={m} val={val} />} key={m}>
|
<DisplayRow title={<MeasieVal {...{ m, val, imperial: mset.imperial }} />} key={m}>
|
||||||
<span className="font-medium">{t(m)}</span>
|
<span className="font-medium">{t(m)}</span>
|
||||||
</DisplayRow>
|
</DisplayRow>
|
||||||
) : null
|
) : null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue