@hedia/recommendation-screen 2.2.0-alpha.32 → 2.2.0-alpha.34

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.
@@ -10,7 +10,7 @@ export interface IProps {
10
10
  cgm: Logbook.Types.ILogbookEntry[`cgm_reading`];
11
11
  /** Unit label to print after the value. */
12
12
  unit: BloodGlucoseUnit;
13
- /** optional object that contains as properties a valueID and a unitID */
13
+ /** optional object that contains as properties a valueID and a unitID */
14
14
  testID?: {
15
15
  valueID: Testing.Id.InfoBarTestIds.Value;
16
16
  unitID: Testing.Id.InfoBarTestIds.Unit;
@@ -46,7 +46,7 @@ const ForecastInfoBar = (props) => {
46
46
  <View style={forecastSubtitle}>
47
47
  <LinearGradient colors={colors.gradientMain} useAngle={true} angle={135} style={forecastDot}/>
48
48
  <TextRegular style={forecastText}>{i18n._(t `Forecast time:`)}</TextRegular>
49
- <TextRegular style={forecastTime}>{String(forecast?.forecastTimestamp)}</TextRegular>
49
+ <TextRegular style={forecastTime}>{`${forecast?.forecastTimestamp}`}</TextRegular>
50
50
  </View>
51
51
  </View>
52
52
 
@@ -42,8 +42,12 @@ export function validateParams(props) {
42
42
  if (props?.calculatorParams?.activity && props?.activityDisplayProps) {
43
43
  checkActivityType(props.activityDisplayProps.activityType);
44
44
  }
45
- checkForecast(props.forecast);
46
- checkCGM(props.cgm);
45
+ if (props?.forecast) {
46
+ checkForecast(props.forecast);
47
+ }
48
+ if (props?.cgm) {
49
+ checkCGM(props.cgm);
50
+ }
47
51
  }
48
52
  /**
49
53
  * In case the users is providing a blood ketone current level, check if the blood ketone unit is defined.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/recommendation-screen",
3
- "version": "2.2.0-alpha.32",
3
+ "version": "2.2.0-alpha.34",
4
4
  "description": "Hedia Recommendation Screen for Bolus and Carbohydrates",
5
5
  "main": "dist/index.js",
6
6
  "files": [