From ae0d3fc88a94ba094b22236e0f6ec6514a33d7af Mon Sep 17 00:00:00 2001 From: Gwynn DP Date: Sun, 14 Nov 2021 17:07:42 -0800 Subject: [PATCH] feat(grower-detail): display device manufacturer with device id --- src/components/GrowerDetail.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/components/GrowerDetail.js b/src/components/GrowerDetail.js index 2fb7db8cb..ae948a21b 100644 --- a/src/components/GrowerDetail.js +++ b/src/components/GrowerDetail.js @@ -95,7 +95,10 @@ const GrowerDetail = (props) => { sortedRegistrations .map((reg) => ({ id: reg.device_identifier, - os: reg.manufacturer === 'apple' ? 'iOS' : 'Android', + os: + reg.manufacturer.toLowerCase() === 'apple' + ? 'iOS' + : 'Android', })) .filter((id) => id), ); @@ -252,16 +255,18 @@ const GrowerDetail = (props) => { {(deviceIdentifiers.length && ( - {deviceIdentifiers.map((device, i) => ( - - - - - ))} + + {deviceIdentifiers.map((device, i) => ( + + + + + ))} +
- {device.id} - - ({device.os}) -
+ {device.id} + + ({device.os}) +
)) || ---}