From 629a96dc16cea40c8832afe71f400d8adf8eeb35 Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Fri, 4 Aug 2017 22:36:43 +0300 Subject: [PATCH] #305: fix flow annotations and naming for linkByOs --- .../instructions/OsInstruction.js | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/components/profile/multiFactorAuth/instructions/OsInstruction.js b/src/components/profile/multiFactorAuth/instructions/OsInstruction.js index b048135..57560a5 100644 --- a/src/components/profile/multiFactorAuth/instructions/OsInstruction.js +++ b/src/components/profile/multiFactorAuth/instructions/OsInstruction.js @@ -8,10 +8,15 @@ import styles from './instructions.scss'; type OS = 'android'|'ios'|'windows'; -const linksByOs: {[key: OS]: Array<{link: string, label: string}>} = { +const linksByOs: { + [key: OS]: { + searchLink: string, + featured: Array<{link: string, label: string}> + } +} = { android: { - storeSearch: 'https://play.google.com/store/search?q=totp%20authenticator', - recommendations: [ + searchLink: 'https://play.google.com/store/search?q=totp%20authenticator', + featured: [ { link: 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2', label: 'Google Authenticator', @@ -27,8 +32,8 @@ const linksByOs: {[key: OS]: Array<{link: string, label: string}>} = { ], }, ios: { - storeSearch: 'https://linkmaker.itunes.apple.com/en-us?mediaType=ios_apps&term=authenticator', - recommendations: [ + searchLink: 'https://linkmaker.itunes.apple.com/en-us?mediaType=ios_apps&term=authenticator', + featured: [ { link: 'https://itunes.apple.com/ru/app/google-authenticator/id388497605', label: 'Google Authenticator', @@ -44,8 +49,8 @@ const linksByOs: {[key: OS]: Array<{link: string, label: string}>} = { ], }, windows: { - storeSearch: 'https://www.microsoft.com/be-by/store/search/apps?devicetype=mobile&q=authenticator', - recommendations: [ + searchLink: 'https://www.microsoft.com/be-by/store/search/apps?devicetype=mobile&q=authenticator', + featured: [ { link: 'https://www.microsoft.com/en-us/store/p/microsoft-authenticator/9nblgggzmcj6', label: 'Microsoft Authenticator', @@ -74,7 +79,7 @@ export default function OsInstruction({
- +