Add getStatusOfScan helper

This commit is contained in:
Sam Carlton 2021-07-10 22:53:39 -05:00
parent 8e476abea6
commit 07541ce785

View file

@ -17,4 +17,20 @@ export function getStatusName ( status ) {
throw new Error('Non status matched')
}
export function getStatusOfScan ( appScan, includeVersion = true ) {
const statusName = getStatusName( appScan['Result'] )
if (statusName === 'native') {
return [
'✅ Yes, Full Native Apple Silicon Support',
includeVersion ? `reported as of v${appScan['App Version']}` : ''
].join('')
}
return '🔶 App has not yet been reported to be native to Apple Silicon'
}
export default statuses