Loading ....
; + } + if (!insight) { + returnNo predicition found
; + } + + const nutrimentsDetected = structurePredictions(values); + return ( +Nutri | +100g | ++ serving{" "} + + | +
{NUTRIMENTS[nutrimentId] ?? nutrimentId} | ++ + setValues((p) => ({ + ...p, + [`${nutrimentId}_100g`]: { + ...p[`${nutrimentId}_100g`], + value: event.target.value, + }, + })) + } + /> + + {isValidUnit(values[`${nutrimentId}_100g`]?.unit) ? ( + + ) : ( + + {values[`${nutrimentId}_100g`]?.unit} + + )} + + | ++ + setValues((p) => ({ + ...p, + [`${nutrimentId}_serving`]: { + ...p[`${nutrimentId}_serving`], + value: event.target.value, + }, + })) + } + /> + + {isValidUnit(values[`${nutrimentId}_serving`]?.unit) ? ( + + ) : ( + + {values[`${nutrimentId}_serving`]?.unit} + + )} + + + | +
+ | + + | ++ + | +
+ {JSON.stringify(insight, null, 2)} ++ )} + */} + +