The LevelThermometer component uses a hard coded value to determine the scale of the overall thermometer. If you change the pointsToLevels and maxLevel values in the constants file, the LevelThermometer will render incorrectly (since it's still referencing the hard coded value).
export const pointsToLevels = {
"0": "1",
"20": "2",
"24": "3",
"29": "4",
"34": "5",
"38": "6",
"43": "7",
"47": "8",
"49": "9",
"51": "10"
};
export const maxLevel = 52;
The LevelThermometer component uses a hard coded value to determine the scale of the overall thermometer. If you change the
pointsToLevelsandmaxLevelvalues in the constants file, the LevelThermometer will render incorrectly (since it's still referencing the hard coded value).Locations where
maxLevelis hard coded instead of referenced.https://github.com/Medium/snowflake/blob/master/components/LevelThermometer.js#L32
https://github.com/Medium/snowflake/blob/master/components/PointSummaries.js#L25
Example
Updating the following values in
constants.jsresults in a poorly formatted thermometer.