Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nutrients are not properly saved by the nutrition game (probably because of ,) #47

Open
teolemon opened this issue Nov 23, 2019 · 6 comments

Comments

@teolemon
Copy link
Member

https://world.openfoodfacts.org/product/3077315890760/dijon-senf-original
Those were the values I entered that have been passed on to the next product, but without units. Perhaps the start of an explanation ?
image

nutriment_energy=1280&%2Cnutriment_fat=23&%2Cnutriment_saturated-fat=13&%2Cnutriment_carbohydrates=20&%2Cnutriment_sugars=18&%2Cnutriment_proteins=5.0&%2Cnutriment_salt=0.3&nutriment_energy_unit=Kj&nutriment_fat_unit=g&nutriment_saturated-fat_unit=g&nutriment_carbohydrates_unit=g&nutriment_sugars_unit=g&nutriment_proteins_unit=g&nutriment_salt_unit=g&code=8718906808232

@teolemon
Copy link
Member Author

nutriment_energy: 1280
,nutriment_fat: 23
,nutriment_saturated-fat: 13
,nutriment_carbohydrates: 20
,nutriment_sugars: 18
,nutriment_proteins: 5.0
,nutriment_salt: 0.3
nutriment_energy_unit: Kj
nutriment_fat_unit: g
nutriment_saturated-fat_unit: g
nutriment_carbohydrates_unit: g
nutriment_sugars_unit: g
nutriment_proteins_unit: g
nutriment_salt_unit: g

@teolemon
Copy link
Member Author

@teolemon teolemon changed the title Nutrients are not properly saved by the nutrition game Nutrients are not properly saved by the nutrition game (probably because of ,) Nov 23, 2019
@teolemon
Copy link
Member Author

index.js:1437 Warning: Each child in a list should have a unique "key" prop.

Check the render method of `NutritionValues`. See https://fb.me/react-warning-keys for more information.
    in option (at NutritionValues/index.js:188)
    in NutritionValues (at src/index.js:28)
console.<computed> @ index.js:1437
warningWithoutStack @ react.development.js:162
warning @ react.development.js:621
validateExplicitKey @ react.development.js:1765
validateChildKeys @ react.development.js:1790
createElementWithValidation @ react.development.js:2027
(anonymous) @ index.js:173
NutritionValues @ index.js:166
renderWithHooks @ react-dom.development.js:16318
updateFunctionComponent @ react-dom.development.js:18364
beginWork$1 @ react-dom.development.js:20166
beginWork$$1 @ react-dom.development.js:25753
performUnitOfWork @ react-dom.development.js:24694
workLoopSync @ react-dom.development.js:24667
performSyncWorkOnRoot @ react-dom.development.js:24256
(anonymous) @ react-dom.development.js:12286
unstable_runWithPriority @ scheduler.development.js:704
runWithPriority$2 @ react-dom.development.js:12232
flushSyncCallbackQueueImpl @ react-dom.development.js:12281
flushSyncCallbackQueue @ react-dom.development.js:12269
scheduleUpdateOnFiber @ react-dom.development.js:23694
dispatchAction @ react-dom.development.js:17113
_callee2$ @ index.js:49
tryCatch @ runtime.js:62
invoke @ runtime.js:288
prototype.<computed> @ runtime.js:114
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js:13
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
AddProducts @ index.js:40
(anonymous) @ index.js:61
commitHookEffectList @ react-dom.development.js:22019
commitPassiveHookEffects @ react-dom.development.js:22052
callCallback @ react-dom.development.js:337
invokeGuardedCallbackDev @ react-dom.development.js:386
invokeGuardedCallback @ react-dom.development.js:439
flushPassiveEffectsImpl @ react-dom.development.js:25388
unstable_runWithPriority @ scheduler.development.js:704
runWithPriority$2 @ react-dom.development.js:12232
flushPassiveEffects @ react-dom.development.js:25357
(anonymous) @ react-dom.development.js:25236
workLoop @ scheduler.development.js:648
flushWork @ scheduler.development.js:603
performWorkUntilDeadline @ scheduler.development.js:199
index.js:1437 Warning: Each child in a list should have a unique "key" prop.

Check the render method of `PortionSetter`. See https://fb.me/react-warning-keys for more information.
    in option (at PortionSetter.js:32)
    in PortionSetter (at NutritionValues/index.js:165)
    in div (at NutritionValues/index.js:135)
    in NutritionValues (at src/index.js:28)
console.<computed> @ index.js:1437
warningWithoutStack @ react.development.js:162
warning @ react.development.js:621
validateExplicitKey @ react.development.js:1765
validateChildKeys @ react.development.js:1790
createElementWithValidation @ react.development.js:2027
PortionSetter @ PortionSetter.js:17
renderWithHooks @ react-dom.development.js:16318
mountIndeterminateComponent @ react-dom.development.js:18801
beginWork$1 @ react-dom.development.js:20152
beginWork$$1 @ react-dom.development.js:25753
performUnitOfWork @ react-dom.development.js:24694
workLoopSync @ react-dom.development.js:24667
performSyncWorkOnRoot @ react-dom.development.js:24256
(anonymous) @ react-dom.development.js:12286
unstable_runWithPriority @ scheduler.development.js:704
runWithPriority$2 @ react-dom.development.js:12232
flushSyncCallbackQueueImpl @ react-dom.development.js:12281
flushSyncCallbackQueue @ react-dom.development.js:12269
scheduleUpdateOnFiber @ react-dom.development.js:23694
dispatchAction @ react-dom.development.js:17113
_callee2$ @ index.js:49
tryCatch @ runtime.js:62
invoke @ runtime.js:288
prototype.<computed> @ runtime.js:114
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js:13
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
AddProducts @ index.js:40
(anonymous) @ index.js:61
commitHookEffectList @ react-dom.development.js:22019
commitPassiveHookEffects @ react-dom.development.js:22052
callCallback @ react-dom.development.js:337
invokeGuardedCallbackDev @ react-dom.development.js:386
invokeGuardedCallback @ react-dom.development.js:439
flushPassiveEffectsImpl @ react-dom.development.js:25388
unstable_runWithPriority @ scheduler.development.js:704
runWithPriority$2 @ react-dom.development.js:12232
flushPassiveEffects @ react-dom.development.js:25357
(anonymous) @ react-dom.development.js:25236
workLoop @ scheduler.development.js:648
flushWork @ scheduler.development.js:603
performWorkUntilDeadline @ scheduler.development.js:199
index.js:1437 Warning: Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.
    in option (at PortionSetter.js:28)
    in select (at PortionSetter.js:23)
    in p (at PortionSetter.js:15)
    in div (at PortionSetter.js:14)
    in PortionSetter (at NutritionValues/index.js:165)
    in div (at NutritionValues/index.js:135)
    in NutritionValues (at src/index.js:28)

@alexfauquette
Copy link
Member

The error message is about missing attributes in the DOM. I open a PR to fix it openfoodfacts/openfoodfacts-hungergames#51

However, It should not fix your problem

@alexfauquette
Copy link
Member

alexfauquette commented Nov 27, 2019

@teolemon Ok, I understand, commas are unwanted. I add a commit to remove them

@alexfauquette
Copy link
Member

@teolemon Is it solved ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants