diff --git a/aliases.config.js b/aliases.config.js new file mode 100644 index 00000000..a013044e --- /dev/null +++ b/aliases.config.js @@ -0,0 +1,10 @@ +module.exports = { + assets: './src/assets', + components: './src/components', + constants: './src/constants', + hooks: './src/hooks', + navigation: './src/navigation', + providers: './src/providers', + services: './src/services', + theme: './src/theme' +}; diff --git a/babel.config.js b/babel.config.js index 9a6d7e62..3d2c4cc7 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,5 @@ +const alias = require('./aliases.config.js'); + module.exports = { presets: [ 'module:metro-react-native-babel-preset', @@ -9,3 +11,38 @@ module.exports = { } } }; + +module.exports = api => { + api.cache(false); + return { + presets: [ + 'module:metro-react-native-babel-preset', + 'module:react-native-dotenv' + ], + env: { + development: { + plugins: [ + [ + 'module-resolver', + { + root: ['./src'], + alias + } + ] + ] + }, + production: { + plugins: [ + 'transform-remove-console', + [ + 'module-resolver', + { + root: ['./src'], + alias + } + ] + ] + } + } + }; +}; diff --git a/index.js b/index.js index 7cd584ca..d4d24e5b 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,6 @@ import {AppRegistry} from 'react-native'; -import App from './App'; + +import App from './src/App'; import {name as appName} from './app.json'; AppRegistry.registerComponent(appName, () => App); diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 888e3e04..3d9ce001 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -212,7 +212,7 @@ PODS: - React-cxxreact (= 0.62.2) - React-jsi (= 0.62.2) - React-jsinspector (0.62.2) - - react-native-exposure-notification-service (1.1.15): + - react-native-exposure-notification-service (1.1.16): - Alamofire (~> 5.2) - KeychainSwift (~> 19.0) - React @@ -321,7 +321,7 @@ PODS: DEPENDENCIES: - Alamofire (~> 5.2) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - EXConstants (from `../node_modules/expo-constants/ios`) + - EXConstants (from `../node_modules/react-native-unimodules/node_modules/expo-constants/ios`) - EXCrypto (from `../node_modules/expo-crypto/ios`) - EXFileSystem (from `../node_modules/expo-file-system/ios`) - EXFont (from `../node_modules/expo-font/ios`) @@ -398,7 +398,7 @@ EXTERNAL SOURCES: DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" EXConstants: - :path: "../node_modules/expo-constants/ios" + :path: "../node_modules/react-native-unimodules/node_modules/expo-constants/ios" EXCrypto: :path: "../node_modules/expo-crypto/ios" EXFileSystem: @@ -522,22 +522,22 @@ SPEC CHECKSUMS: Alamofire: e911732990610fe89af59ac0077f923d72dc3dfd boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 - EXConstants: 5304709b1bea70a4828f48ba4c7fc3ec3b2d9b17 - EXCrypto: 867e1d45d513e39ab9d7706232435edb1cf756cd - EXFileSystem: cf4232ba7c62dc49b78c2d36005f97b6fddf0b01 - EXFont: e583875d5d37a9e272d1cdba7f383bd576952919 - EXHaptics: 013b5065946d4dd7b46ea547b58072d45a206dbd - EXImageLoader: 5ad6896fa1ef2ee814b551873cbf7a7baccc694a - EXLocalization: b5bcfc925ed83123b585d46d3bd54d7b7118f307 - EXPermissions: 24b97f734ce9172d245a5be38ad9ccfcb6135964 - EXSecureStore: 7a03e21e80ae59bf8e86c55e7a400f60db2da639 - EXWebBrowser: 5902f99ac5ac551e5c82ff46f13a337b323aa9ea + EXConstants: 9f18e9ef229706394f41735d9c7f309d479b36c0 + EXCrypto: 84a96afc7bb083729d86b934a5e1633d67a3ddc0 + EXFileSystem: b82693d78de152efe10a77d4aac781f782e10916 + EXFont: 5c464ce400b92f87f907d68093c29946177295bf + EXHaptics: 3e6a4a40d87b230ffe1fafe298393ab6f3b8e10d + EXImageLoader: 5c9d1bf408443ac4d4f44463eaf3b0d03bc70425 + EXLocalization: 2c66021723ee3d91b7ce2627cc27979ddd648fe7 + EXPermissions: d2cafee9c72578ecc9ca121481e6c4a04a798861 + EXSecureStore: b31ab621ceaee41090da9220ddc041a9186e37b5 + EXWebBrowser: 6364e9e1ea73f6c3c2e6e3cc0ac17259a260e3a8 FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245 FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 glog: 1f3da668190260b06b429bb211bfbee5cd790c28 KeychainSwift: a06190cf933ad46b1e0abc3d77d29c06331715c7 - Permission-Notifications: 231d0e1db2300b686548587d384ba414e6a93332 + Permission-Notifications: 5ecb0f433b585c5621dc30b168772d60ae8574c2 RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035 RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3 @@ -547,9 +547,9 @@ SPEC CHECKSUMS: React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161 React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493 - react-native-exposure-notification-service: a3549bb2ef087e96f1c6c1a889004b2b583975f5 - react-native-netinfo: a53b00d949b6456913aaf507d9dba90c4008c611 - react-native-safe-area-context: 45e98227f3d65b31d384a5d0950aec4bf73a884c + react-native-exposure-notification-service: 5b6b8a5db689c59796c4b24ccf8354a13364c7f2 + react-native-netinfo: 7f3f3ed9e8f0e7ab3e7cac00cbfdc6997e25ecaf + react-native-safe-area-context: 7371751a75e1ca7211f17ea0730ffcb264e2f85c React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0 React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71 @@ -560,29 +560,29 @@ SPEC CHECKSUMS: React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256 ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3 - RNCAsyncStorage: d059c3ee71738c39834a627476322a5a8cd5bf36 - RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f - RNCPushNotificationIOS: dc1c0c6aa18a128df123598149f42e848d26a4ac + RNCAsyncStorage: db711e29e5e0500d9bd21aa0c2e397efa45302b1 + RNCMaskedView: f5c7d14d6847b7b44853f7acb6284c1da30a3459 + RNCPushNotificationIOS: f4a1a20fe1d70bbb1fab6abf86ffec2996012b12 RNGestureHandler: b6b359bb800ae399a9c8b27032bdbf7c18f08a08 - RNIOS11DeviceCheck: a4a545fdd08230a17a8ce7608e95038ee23a32aa - RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467 + RNIOS11DeviceCheck: d525b786c29d2793f8534bd3a321998a7a827a5f + RNPermissions: 1888705aebcc81714efa5dbff94351e4388ae012 RNScreens: 62211832af51e0aebcf6e8c36bcf7dd65592f244 RNSslPinning: bd33a1849ec20d38b4c5cd67e6a52b83da0ab3bc RNSVG: f6177f8d7c095fada7cfee2e4bb7388ba426064c SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9 - UMAppLoader: ee77a072f9e15128f777ccd6d2d00f52ab4387e6 - UMBarCodeScannerInterface: 9dc692b87e5f20fe277fa57aa47f45d418c3cc6c - UMCameraInterface: 625878bbf2ba188a8548675e1d1d2e438a653e6d - UMConstantsInterface: 64060cf86587bcd90b1dbd804cceb6d377a308c1 - UMCore: eb200e882eadafcd31ead290770835fd648c0945 - UMFaceDetectorInterface: d6677d6ddc9ab95a0ca857aa7f8ba76656cc770f - UMFileSystemInterface: c70ea7147198b9807080f3597f26236be49b0165 - UMFontInterface: d9d3b27af698c5389ae9e20b99ef56a083f491fb - UMImageLoaderInterface: 14dd2c46c67167491effc9e91250e9510f12709e - UMPermissionsInterface: 5e83a9167c177e4a0f0a3539345983cc749efb3e - UMReactNativeAdapter: 126da3486c1a1f11945b649d557d6c2ebb9407b2 - UMSensorsInterface: 48941f70175e2975af1a9386c6d6cb16d8126805 - UMTaskManagerInterface: cb890c79c63885504ddc0efd7a7d01481760aca2 + UMAppLoader: ae5eaee9f3c8cc847c631a579fed20d217de5913 + UMBarCodeScannerInterface: aa3409ab9d108866e55c09ad0292e4a6c08a7775 + UMCameraInterface: 9d5da92c521e0af7815afbf77ea19bd0312b4928 + UMConstantsInterface: 4a1d3062a89421d3290bbe8f75efabd849935bea + UMCore: cb544737bc72ecfccae9dd476e4d647468b4ebd0 + UMFaceDetectorInterface: c6d69c914426fc29f5a2442411a575e887adb823 + UMFileSystemInterface: bee6c9ca4f3d70da5f7c9752efc8b3f3a7f47b61 + UMFontInterface: 884955c5fd329095e2072d16de9b5bf1bce93005 + UMImageLoaderInterface: 3781f05d7e0be1c5b00dd3cc9c390b94d8484300 + UMPermissionsInterface: a3c5910e28a5ec31810dbfd1936e4948a4439310 + UMReactNativeAdapter: e936c48fd15114cd1d5b06310797198a06f72ca0 + UMSensorsInterface: fc92b1f92202166284ca0f95e0acc1daab5d16a8 + UMTaskManagerInterface: 4e6c4c34a89512e2225d336154df1cb689226a29 Yoga: 3ebccbdd559724312790e7742142d062476b698e PODFILE CHECKSUM: fe5332bfe94340e09768442eda194c2d51dd1b1f diff --git a/constants/env.d.ts b/src/@types/env.d.ts similarity index 100% rename from constants/env.d.ts rename to src/@types/env.d.ts diff --git a/src/@types/react-native-easy-markdown.d.ts b/src/@types/react-native-easy-markdown.d.ts new file mode 100644 index 00000000..96e660f2 --- /dev/null +++ b/src/@types/react-native-easy-markdown.d.ts @@ -0,0 +1 @@ +declare module 'react-native-easy-markdown'; diff --git a/src/@types/react-native-google-safetynet.d.ts b/src/@types/react-native-google-safetynet.d.ts new file mode 100644 index 00000000..50a339cf --- /dev/null +++ b/src/@types/react-native-google-safetynet.d.ts @@ -0,0 +1 @@ +declare module 'react-native-google-safetynet'; diff --git a/src/@types/react-native-ios11-devicecheck.d.ts b/src/@types/react-native-ios11-devicecheck.d.ts new file mode 100644 index 00000000..9b81b155 --- /dev/null +++ b/src/@types/react-native-ios11-devicecheck.d.ts @@ -0,0 +1 @@ +declare module 'react-native-ios11-devicecheck'; diff --git a/App.tsx b/src/App.tsx similarity index 79% rename from App.tsx rename to src/App.tsx index 883d9dd2..85331718 100644 --- a/App.tsx +++ b/src/App.tsx @@ -1,13 +1,6 @@ import React, {useEffect} from 'react'; import {enableScreens} from 'react-native-screens'; -import { - Platform, - StatusBar, - Image, - View, - AppState, - StyleSheet -} from 'react-native'; +import {Platform, StatusBar, Image, View, AppState} from 'react-native'; import {NavigationContainer} from '@react-navigation/native'; import { createStackNavigator, @@ -26,53 +19,48 @@ import {useTranslation} from 'react-i18next'; import {Asset} from 'expo-asset'; import * as Font from 'expo-font'; -import './services/i18n'; +import 'services/i18n'; -import {ApplicationProvider, useApplication} from './providers/context'; -import {ExposureProvider} from './providers/exposure'; -import {PermissionsProvider} from './providers/permissions'; +import {ApplicationProvider, useApplication} from 'providers/context'; +import {ExposureProvider} from 'providers/exposure'; +import {PermissionsProvider} from 'providers/permissions'; import { SettingsProvider, SettingsContext, TraceConfiguration -} from './providers/settings'; - -import {Base} from './components/templates/base'; -import {NavBar} from './components/atoms/navbar'; -import {TabBarBottom} from './components/organisms/tab-bar-bottom'; - -import {Over16} from './components/views/over-16'; -import {Under16} from './components/views/under-16'; -import {GetStarted} from './components/views/get-started'; -import {YourData} from './components/views/your-data'; -import {AppUsage} from './components/views/app-usage'; -import {ContactTracingInformation} from './components/views/contact-tracing-information'; -import {FollowUpCall} from './components/views/follow-up-call'; - -import {Sorry} from './components/views/sorry'; +} from 'providers/settings'; + +import {Base} from 'components/templates/base'; +import {NavBar} from 'components/atoms/navbar'; +import {TabBarBottom} from 'components/organisms/tab-bar-bottom'; +import {Over16} from 'components/views/over-16'; +import {Under16} from 'components/views/under-16'; +import {GetStarted} from 'components/views/get-started'; +import {YourData} from 'components/views/your-data'; +import {AppUsage} from 'components/views/app-usage'; +import {ContactTracingInformation} from 'components/views/contact-tracing-information'; +import {FollowUpCall} from 'components/views/follow-up-call'; +import {Sorry} from 'components/views/sorry'; import { DataProtectionPolicy, TermsAndConditions -} from './components/views/data-protection-policy'; - -import {Dashboard} from './components/views/dashboard'; -import {SymptomChecker} from './components/views/symptom-checker'; -import {SymptomsHistory} from './components/views/symptoms-history'; -import {ContactTracing} from './components/views/contact-tracing'; -import {CountyBreakdown} from './components/views/county-breakdown'; -import {CloseContact} from './components/views/close-contact'; -import {UploadKeys} from './components/views/upload-keys'; - -import {Settings} from './components/views/settings'; -import {ContactTracingSettings} from './components/views/settings/contact-tracing'; -import {CheckInSettings} from './components/views/settings/check-in'; -import {Metrics} from './components/views/settings/metrics'; -import {Leave} from './components/views/settings/leave'; -import {Debug} from './components/views/settings/debug'; - -import {isMountedRef, navigationRef} from './navigation'; -import {colors} from './constants/colors'; -import {Loading} from './components/views/loading'; +} from 'components/views/data-protection-policy'; +import {Dashboard} from 'components/views/dashboard'; +import {SymptomChecker} from 'components/views/symptom-checker'; +import {SymptomsHistory} from 'components/views/symptoms-history'; +import {ContactTracing} from 'components/views/contact-tracing'; +import {CountyBreakdown} from 'components/views/county-breakdown'; +import {CloseContact} from 'components/views/close-contact'; +import {UploadKeys} from 'components/views/upload-keys'; +import {Settings} from 'components/views/settings'; +import {ContactTracingSettings} from 'components/views/settings/contact-tracing'; +import {CheckInSettings} from 'components/views/settings/check-in'; +import {Metrics} from 'components/views/settings/metrics'; +import {Leave} from 'components/views/settings/leave'; +import {Debug} from 'components/views/settings/debug'; +import {isMountedRef, navigationRef} from 'navigation'; +import {colors} from 'theme'; +import {Loading} from 'components/views/loading'; enableScreens(); @@ -354,23 +342,23 @@ export default function App(props: { async function loadResourcesAndDataAsync() { try { const imageAssets = cacheImages([ - require('./assets/images/onboard1/image.png'), - require('./assets/images/onboard2/image.png'), - require('./assets/images/onboard3/image.png'), - require('./assets/images/permissions/bluetooth.png'), - require('./assets/images/permissions/notifications.png'), - require('./assets/images/logo/logo.png'), - require('./assets/images/symptoma/image.png'), - require('./assets/images/symptomb/image.png'), - require('./assets/images/symptomc/image.png'), - require('./assets/images/symptomd/image.png') + require('assets/images/onboard1/image.png'), + require('assets/images/onboard2/image.png'), + require('assets/images/onboard3/image.png'), + require('assets/images/permissions/bluetooth.png'), + require('assets/images/permissions/notifications.png'), + require('assets/images/logo/logo.png'), + require('assets/images/symptoma/image.png'), + require('assets/images/symptomb/image.png'), + require('assets/images/symptomc/image.png'), + require('assets/images/symptomd/image.png') ]); const fonts = await Font.loadAsync({ - 'lato-black': require('./assets/fonts/lato/Lato-Black.ttf'), - 'lato-bold': require('./assets/fonts/lato/Lato-Bold.ttf'), - lato: require('./assets/fonts/lato/Lato-Regular.ttf'), - 'lato-thin': require('./assets/fonts/lato/Lato-Thin.ttf') + 'lato-black': require('assets/fonts/lato/Lato-Black.ttf'), + 'lato-bold': require('assets/fonts/lato/Lato-Bold.ttf'), + lato: require('assets/fonts/lato/Lato-Regular.ttf'), + 'lato-thin': require('assets/fonts/lato/Lato-Thin.ttf') }); await Promise.all([...imageAssets, fonts]); diff --git a/assets/age-bg.png b/src/assets/age-bg.png similarity index 100% rename from assets/age-bg.png rename to src/assets/age-bg.png diff --git a/assets/age-bg@2x.png b/src/assets/age-bg@2x.png similarity index 100% rename from assets/age-bg@2x.png rename to src/assets/age-bg@2x.png diff --git a/assets/age-bg@3x.png b/src/assets/age-bg@3x.png similarity index 100% rename from assets/age-bg@3x.png rename to src/assets/age-bg@3x.png diff --git a/assets/country-codes.ts b/src/assets/country-codes.ts similarity index 100% rename from assets/country-codes.ts rename to src/assets/country-codes.ts diff --git a/assets/fonts/lato/Lato-Black.ttf b/src/assets/fonts/lato/Lato-Black.ttf similarity index 100% rename from assets/fonts/lato/Lato-Black.ttf rename to src/assets/fonts/lato/Lato-Black.ttf diff --git a/assets/fonts/lato/Lato-BlackItalic.ttf b/src/assets/fonts/lato/Lato-BlackItalic.ttf similarity index 100% rename from assets/fonts/lato/Lato-BlackItalic.ttf rename to src/assets/fonts/lato/Lato-BlackItalic.ttf diff --git a/assets/fonts/lato/Lato-Bold.ttf b/src/assets/fonts/lato/Lato-Bold.ttf similarity index 100% rename from assets/fonts/lato/Lato-Bold.ttf rename to src/assets/fonts/lato/Lato-Bold.ttf diff --git a/assets/fonts/lato/Lato-BoldItalic.ttf b/src/assets/fonts/lato/Lato-BoldItalic.ttf similarity index 100% rename from assets/fonts/lato/Lato-BoldItalic.ttf rename to src/assets/fonts/lato/Lato-BoldItalic.ttf diff --git a/assets/fonts/lato/Lato-Italic.ttf b/src/assets/fonts/lato/Lato-Italic.ttf similarity index 100% rename from assets/fonts/lato/Lato-Italic.ttf rename to src/assets/fonts/lato/Lato-Italic.ttf diff --git a/assets/fonts/lato/Lato-Light.ttf b/src/assets/fonts/lato/Lato-Light.ttf similarity index 100% rename from assets/fonts/lato/Lato-Light.ttf rename to src/assets/fonts/lato/Lato-Light.ttf diff --git a/assets/fonts/lato/Lato-LightItalic.ttf b/src/assets/fonts/lato/Lato-LightItalic.ttf similarity index 100% rename from assets/fonts/lato/Lato-LightItalic.ttf rename to src/assets/fonts/lato/Lato-LightItalic.ttf diff --git a/assets/fonts/lato/Lato-Regular.ttf b/src/assets/fonts/lato/Lato-Regular.ttf similarity index 100% rename from assets/fonts/lato/Lato-Regular.ttf rename to src/assets/fonts/lato/Lato-Regular.ttf diff --git a/assets/fonts/lato/Lato-Thin.ttf b/src/assets/fonts/lato/Lato-Thin.ttf similarity index 100% rename from assets/fonts/lato/Lato-Thin.ttf rename to src/assets/fonts/lato/Lato-Thin.ttf diff --git a/assets/fonts/lato/Lato-ThinItalic.ttf b/src/assets/fonts/lato/Lato-ThinItalic.ttf similarity index 100% rename from assets/fonts/lato/Lato-ThinItalic.ttf rename to src/assets/fonts/lato/Lato-ThinItalic.ttf diff --git a/assets/fonts/lato/OFL.txt b/src/assets/fonts/lato/OFL.txt similarity index 100% rename from assets/fonts/lato/OFL.txt rename to src/assets/fonts/lato/OFL.txt diff --git a/assets/headerbg.png b/src/assets/headerbg.png similarity index 100% rename from assets/headerbg.png rename to src/assets/headerbg.png diff --git a/assets/headerbg@2x.png b/src/assets/headerbg@2x.png similarity index 100% rename from assets/headerbg@2x.png rename to src/assets/headerbg@2x.png diff --git a/assets/headerbg@3x.png b/src/assets/headerbg@3x.png similarity index 100% rename from assets/headerbg@3x.png rename to src/assets/headerbg@3x.png diff --git a/assets/icon.png b/src/assets/icon.png similarity index 100% rename from assets/icon.png rename to src/assets/icon.png diff --git a/assets/icons/app/alert.svg b/src/assets/icons/app/alert.svg similarity index 100% rename from assets/icons/app/alert.svg rename to src/assets/icons/app/alert.svg diff --git a/assets/icons/app/arrow-right.svg b/src/assets/icons/app/arrow-right.svg similarity index 100% rename from assets/icons/app/arrow-right.svg rename to src/assets/icons/app/arrow-right.svg diff --git a/assets/icons/app/back-android.svg b/src/assets/icons/app/back-android.svg similarity index 100% rename from assets/icons/app/back-android.svg rename to src/assets/icons/app/back-android.svg diff --git a/assets/icons/app/back-ios.svg b/src/assets/icons/app/back-ios.svg similarity index 100% rename from assets/icons/app/back-ios.svg rename to src/assets/icons/app/back-ios.svg diff --git a/assets/icons/app/bluetooth.svg b/src/assets/icons/app/bluetooth.svg similarity index 100% rename from assets/icons/app/bluetooth.svg rename to src/assets/icons/app/bluetooth.svg diff --git a/assets/icons/app/close.svg b/src/assets/icons/app/close.svg similarity index 100% rename from assets/icons/app/close.svg rename to src/assets/icons/app/close.svg diff --git a/assets/icons/app/notification.svg b/src/assets/icons/app/notification.svg similarity index 100% rename from assets/icons/app/notification.svg rename to src/assets/icons/app/notification.svg diff --git a/assets/icons/app/share-android.svg b/src/assets/icons/app/share-android.svg similarity index 100% rename from assets/icons/app/share-android.svg rename to src/assets/icons/app/share-android.svg diff --git a/assets/icons/app/share-ios.svg b/src/assets/icons/app/share-ios.svg similarity index 100% rename from assets/icons/app/share-ios.svg rename to src/assets/icons/app/share-ios.svg diff --git a/assets/icons/app/success.svg b/src/assets/icons/app/success.svg similarity index 100% rename from assets/icons/app/success.svg rename to src/assets/icons/app/success.svg diff --git a/assets/icons/bubble/cases.svg b/src/assets/icons/bubble/cases.svg similarity index 100% rename from assets/icons/bubble/cases.svg rename to src/assets/icons/bubble/cases.svg diff --git a/assets/icons/bubble/check-in.svg b/src/assets/icons/bubble/check-in.svg similarity index 100% rename from assets/icons/bubble/check-in.svg rename to src/assets/icons/bubble/check-in.svg diff --git a/assets/icons/bubble/deaths.svg b/src/assets/icons/bubble/deaths.svg similarity index 100% rename from assets/icons/bubble/deaths.svg rename to src/assets/icons/bubble/deaths.svg diff --git a/assets/icons/bubble/hospital.svg b/src/assets/icons/bubble/hospital.svg similarity index 100% rename from assets/icons/bubble/hospital.svg rename to src/assets/icons/bubble/hospital.svg diff --git a/assets/icons/bubble/icu.svg b/src/assets/icons/bubble/icu.svg similarity index 100% rename from assets/icons/bubble/icu.svg rename to src/assets/icons/bubble/icu.svg diff --git a/assets/icons/bubble/map-pin.svg b/src/assets/icons/bubble/map-pin.svg similarity index 100% rename from assets/icons/bubble/map-pin.svg rename to src/assets/icons/bubble/map-pin.svg diff --git a/assets/icons/bubble/phone-call.svg b/src/assets/icons/bubble/phone-call.svg similarity index 100% rename from assets/icons/bubble/phone-call.svg rename to src/assets/icons/bubble/phone-call.svg diff --git a/assets/icons/bubble/shield.svg b/src/assets/icons/bubble/shield.svg similarity index 100% rename from assets/icons/bubble/shield.svg rename to src/assets/icons/bubble/shield.svg diff --git a/assets/icons/bubble/survey.svg b/src/assets/icons/bubble/survey.svg similarity index 100% rename from assets/icons/bubble/survey.svg rename to src/assets/icons/bubble/survey.svg diff --git a/assets/icons/bubble/symptom.svg b/src/assets/icons/bubble/symptom.svg similarity index 100% rename from assets/icons/bubble/symptom.svg rename to src/assets/icons/bubble/symptom.svg diff --git a/assets/icons/check-mark-multiselect.svg b/src/assets/icons/check-mark-multiselect.svg similarity index 100% rename from assets/icons/check-mark-multiselect.svg rename to src/assets/icons/check-mark-multiselect.svg diff --git a/assets/icons/check-mark.svg b/src/assets/icons/check-mark.svg similarity index 100% rename from assets/icons/check-mark.svg rename to src/assets/icons/check-mark.svg diff --git a/assets/icons/index.ts b/src/assets/icons/index.ts similarity index 100% rename from assets/icons/index.ts rename to src/assets/icons/index.ts diff --git a/assets/icons/logo.svg b/src/assets/icons/logo.svg similarity index 100% rename from assets/icons/logo.svg rename to src/assets/icons/logo.svg diff --git a/assets/icons/privacy.svg b/src/assets/icons/privacy.svg similarity index 100% rename from assets/icons/privacy.svg rename to src/assets/icons/privacy.svg diff --git a/assets/icons/tab-bar/check-in.svg b/src/assets/icons/tab-bar/check-in.svg similarity index 100% rename from assets/icons/tab-bar/check-in.svg rename to src/assets/icons/tab-bar/check-in.svg diff --git a/assets/icons/tab-bar/contact-tracing-off.svg b/src/assets/icons/tab-bar/contact-tracing-off.svg similarity index 100% rename from assets/icons/tab-bar/contact-tracing-off.svg rename to src/assets/icons/tab-bar/contact-tracing-off.svg diff --git a/assets/icons/tab-bar/contact-tracing-on.svg b/src/assets/icons/tab-bar/contact-tracing-on.svg similarity index 100% rename from assets/icons/tab-bar/contact-tracing-on.svg rename to src/assets/icons/tab-bar/contact-tracing-on.svg diff --git a/assets/icons/tab-bar/contact-tracing-unknown.svg b/src/assets/icons/tab-bar/contact-tracing-unknown.svg similarity index 100% rename from assets/icons/tab-bar/contact-tracing-unknown.svg rename to src/assets/icons/tab-bar/contact-tracing-unknown.svg diff --git a/assets/icons/tab-bar/settings-android.svg b/src/assets/icons/tab-bar/settings-android.svg similarity index 100% rename from assets/icons/tab-bar/settings-android.svg rename to src/assets/icons/tab-bar/settings-android.svg diff --git a/assets/icons/tab-bar/settings-ios.svg b/src/assets/icons/tab-bar/settings-ios.svg similarity index 100% rename from assets/icons/tab-bar/settings-ios.svg rename to src/assets/icons/tab-bar/settings-ios.svg diff --git a/assets/icons/tab-bar/updates.svg b/src/assets/icons/tab-bar/updates.svg similarity index 100% rename from assets/icons/tab-bar/updates.svg rename to src/assets/icons/tab-bar/updates.svg diff --git a/assets/images/apple/image.png b/src/assets/images/apple/image.png similarity index 100% rename from assets/images/apple/image.png rename to src/assets/images/apple/image.png diff --git a/assets/images/apple/image@2x.png b/src/assets/images/apple/image@2x.png similarity index 100% rename from assets/images/apple/image@2x.png rename to src/assets/images/apple/image@2x.png diff --git a/assets/images/apple/image@3x.png b/src/assets/images/apple/image@3x.png similarity index 100% rename from assets/images/apple/image@3x.png rename to src/assets/images/apple/image@3x.png diff --git a/assets/images/callback/image.png b/src/assets/images/callback/image.png similarity index 100% rename from assets/images/callback/image.png rename to src/assets/images/callback/image.png diff --git a/assets/images/callback/image@2x.png b/src/assets/images/callback/image@2x.png similarity index 100% rename from assets/images/callback/image@2x.png rename to src/assets/images/callback/image@2x.png diff --git a/assets/images/callback/image@3x.png b/src/assets/images/callback/image@3x.png similarity index 100% rename from assets/images/callback/image@3x.png rename to src/assets/images/callback/image@3x.png diff --git a/assets/images/contact-tracing/contact-tracing-spin.png b/src/assets/images/contact-tracing/contact-tracing-spin.png similarity index 100% rename from assets/images/contact-tracing/contact-tracing-spin.png rename to src/assets/images/contact-tracing/contact-tracing-spin.png diff --git a/assets/images/contact-tracing/contact-tracing-spin@2x.png b/src/assets/images/contact-tracing/contact-tracing-spin@2x.png similarity index 100% rename from assets/images/contact-tracing/contact-tracing-spin@2x.png rename to src/assets/images/contact-tracing/contact-tracing-spin@2x.png diff --git a/assets/images/contact-tracing/contact-tracing-spin@3x.png b/src/assets/images/contact-tracing/contact-tracing-spin@3x.png similarity index 100% rename from assets/images/contact-tracing/contact-tracing-spin@3x.png rename to src/assets/images/contact-tracing/contact-tracing-spin@3x.png diff --git a/src/assets/images/contact-tracing/ct-off-selected.png b/src/assets/images/contact-tracing/ct-off-selected.png new file mode 100644 index 00000000..078d3693 Binary files /dev/null and b/src/assets/images/contact-tracing/ct-off-selected.png differ diff --git a/src/assets/images/contact-tracing/ct-off-selected@2x.png b/src/assets/images/contact-tracing/ct-off-selected@2x.png new file mode 100644 index 00000000..97ff1fec Binary files /dev/null and b/src/assets/images/contact-tracing/ct-off-selected@2x.png differ diff --git a/src/assets/images/contact-tracing/ct-off-selected@3x.png b/src/assets/images/contact-tracing/ct-off-selected@3x.png new file mode 100644 index 00000000..5d12624c Binary files /dev/null and b/src/assets/images/contact-tracing/ct-off-selected@3x.png differ diff --git a/src/assets/images/contact-tracing/ct-off-unselected.png b/src/assets/images/contact-tracing/ct-off-unselected.png new file mode 100644 index 00000000..6880dab0 Binary files /dev/null and b/src/assets/images/contact-tracing/ct-off-unselected.png differ diff --git a/src/assets/images/contact-tracing/ct-off-unselected@2x.png b/src/assets/images/contact-tracing/ct-off-unselected@2x.png new file mode 100644 index 00000000..693ed0d1 Binary files /dev/null and b/src/assets/images/contact-tracing/ct-off-unselected@2x.png differ diff --git a/src/assets/images/contact-tracing/ct-off-unselected@3x.png b/src/assets/images/contact-tracing/ct-off-unselected@3x.png new file mode 100644 index 00000000..e9306795 Binary files /dev/null and b/src/assets/images/contact-tracing/ct-off-unselected@3x.png differ diff --git a/src/assets/images/contact-tracing/ct-on-selected.png b/src/assets/images/contact-tracing/ct-on-selected.png new file mode 100644 index 00000000..02c19f0c Binary files /dev/null and b/src/assets/images/contact-tracing/ct-on-selected.png differ diff --git a/src/assets/images/contact-tracing/ct-on-selected@2x.png b/src/assets/images/contact-tracing/ct-on-selected@2x.png new file mode 100644 index 00000000..94fff23a Binary files /dev/null and b/src/assets/images/contact-tracing/ct-on-selected@2x.png differ diff --git a/src/assets/images/contact-tracing/ct-on-selected@3x.png b/src/assets/images/contact-tracing/ct-on-selected@3x.png new file mode 100644 index 00000000..0442cc97 Binary files /dev/null and b/src/assets/images/contact-tracing/ct-on-selected@3x.png differ diff --git a/src/assets/images/contact-tracing/ct-on-unselected.png b/src/assets/images/contact-tracing/ct-on-unselected.png new file mode 100644 index 00000000..aade139f Binary files /dev/null and b/src/assets/images/contact-tracing/ct-on-unselected.png differ diff --git a/src/assets/images/contact-tracing/ct-on-unselected@2x.png b/src/assets/images/contact-tracing/ct-on-unselected@2x.png new file mode 100644 index 00000000..0363d177 Binary files /dev/null and b/src/assets/images/contact-tracing/ct-on-unselected@2x.png differ diff --git a/src/assets/images/contact-tracing/ct-on-unselected@3x.png b/src/assets/images/contact-tracing/ct-on-unselected@3x.png new file mode 100644 index 00000000..344a44be Binary files /dev/null and b/src/assets/images/contact-tracing/ct-on-unselected@3x.png differ diff --git a/assets/images/exposure-alert/exposure-alert.png b/src/assets/images/exposure-alert/exposure-alert.png similarity index 100% rename from assets/images/exposure-alert/exposure-alert.png rename to src/assets/images/exposure-alert/exposure-alert.png diff --git a/assets/images/exposure-alert/exposure-alert@2x.png b/src/assets/images/exposure-alert/exposure-alert@2x.png similarity index 100% rename from assets/images/exposure-alert/exposure-alert@2x.png rename to src/assets/images/exposure-alert/exposure-alert@2x.png diff --git a/assets/images/exposure-alert/exposure-alert@3x.png b/src/assets/images/exposure-alert/exposure-alert@3x.png similarity index 100% rename from assets/images/exposure-alert/exposure-alert@3x.png rename to src/assets/images/exposure-alert/exposure-alert@3x.png diff --git a/assets/images/google/image.png b/src/assets/images/google/image.png similarity index 100% rename from assets/images/google/image.png rename to src/assets/images/google/image.png diff --git a/assets/images/google/image@2x.png b/src/assets/images/google/image@2x.png similarity index 100% rename from assets/images/google/image@2x.png rename to src/assets/images/google/image@2x.png diff --git a/assets/images/google/image@3x.png b/src/assets/images/google/image@3x.png similarity index 100% rename from assets/images/google/image@3x.png rename to src/assets/images/google/image@3x.png diff --git a/assets/images/information/alt.png b/src/assets/images/information/alt.png similarity index 100% rename from assets/images/information/alt.png rename to src/assets/images/information/alt.png diff --git a/assets/images/information/alt@2x.png b/src/assets/images/information/alt@2x.png similarity index 100% rename from assets/images/information/alt@2x.png rename to src/assets/images/information/alt@2x.png diff --git a/assets/images/information/alt@3x.png b/src/assets/images/information/alt@3x.png similarity index 100% rename from assets/images/information/alt@3x.png rename to src/assets/images/information/alt@3x.png diff --git a/assets/images/information/image.png b/src/assets/images/information/image.png similarity index 100% rename from assets/images/information/image.png rename to src/assets/images/information/image.png diff --git a/assets/images/information/image@2x.png b/src/assets/images/information/image@2x.png similarity index 100% rename from assets/images/information/image@2x.png rename to src/assets/images/information/image@2x.png diff --git a/assets/images/information/image@3x.png b/src/assets/images/information/image@3x.png similarity index 100% rename from assets/images/information/image@3x.png rename to src/assets/images/information/image@3x.png diff --git a/assets/images/logo/logo.png b/src/assets/images/logo/logo.png similarity index 100% rename from assets/images/logo/logo.png rename to src/assets/images/logo/logo.png diff --git a/assets/images/logo/logo@2x.png b/src/assets/images/logo/logo@2x.png similarity index 100% rename from assets/images/logo/logo@2x.png rename to src/assets/images/logo/logo@2x.png diff --git a/assets/images/logo/logo@3x.png b/src/assets/images/logo/logo@3x.png similarity index 100% rename from assets/images/logo/logo@3x.png rename to src/assets/images/logo/logo@3x.png diff --git a/assets/images/onboard1/image.png b/src/assets/images/onboard1/image.png similarity index 100% rename from assets/images/onboard1/image.png rename to src/assets/images/onboard1/image.png diff --git a/assets/images/onboard1/image@2x.png b/src/assets/images/onboard1/image@2x.png similarity index 100% rename from assets/images/onboard1/image@2x.png rename to src/assets/images/onboard1/image@2x.png diff --git a/assets/images/onboard1/image@3x.png b/src/assets/images/onboard1/image@3x.png similarity index 100% rename from assets/images/onboard1/image@3x.png rename to src/assets/images/onboard1/image@3x.png diff --git a/assets/images/onboard2/image.png b/src/assets/images/onboard2/image.png similarity index 100% rename from assets/images/onboard2/image.png rename to src/assets/images/onboard2/image.png diff --git a/assets/images/onboard2/image@2x.png b/src/assets/images/onboard2/image@2x.png similarity index 100% rename from assets/images/onboard2/image@2x.png rename to src/assets/images/onboard2/image@2x.png diff --git a/assets/images/onboard2/image@3x.png b/src/assets/images/onboard2/image@3x.png similarity index 100% rename from assets/images/onboard2/image@3x.png rename to src/assets/images/onboard2/image@3x.png diff --git a/assets/images/onboard3/image.png b/src/assets/images/onboard3/image.png similarity index 100% rename from assets/images/onboard3/image.png rename to src/assets/images/onboard3/image.png diff --git a/assets/images/onboard3/image@2x.png b/src/assets/images/onboard3/image@2x.png similarity index 100% rename from assets/images/onboard3/image@2x.png rename to src/assets/images/onboard3/image@2x.png diff --git a/assets/images/onboard3/image@3x.png b/src/assets/images/onboard3/image@3x.png similarity index 100% rename from assets/images/onboard3/image@3x.png rename to src/assets/images/onboard3/image@3x.png diff --git a/assets/images/onboard4/image.png b/src/assets/images/onboard4/image.png similarity index 100% rename from assets/images/onboard4/image.png rename to src/assets/images/onboard4/image.png diff --git a/assets/images/onboard4/image@2x.png b/src/assets/images/onboard4/image@2x.png similarity index 100% rename from assets/images/onboard4/image@2x.png rename to src/assets/images/onboard4/image@2x.png diff --git a/assets/images/onboard4/image@3x.png b/src/assets/images/onboard4/image@3x.png similarity index 100% rename from assets/images/onboard4/image@3x.png rename to src/assets/images/onboard4/image@3x.png diff --git a/assets/images/onboarding-bg/bg.png b/src/assets/images/onboarding-bg/bg.png similarity index 100% rename from assets/images/onboarding-bg/bg.png rename to src/assets/images/onboarding-bg/bg.png diff --git a/assets/images/onboarding-bg/bg@2x.png b/src/assets/images/onboarding-bg/bg@2x.png similarity index 100% rename from assets/images/onboarding-bg/bg@2x.png rename to src/assets/images/onboarding-bg/bg@2x.png diff --git a/assets/images/onboarding-bg/bg@3x.png b/src/assets/images/onboarding-bg/bg@3x.png similarity index 100% rename from assets/images/onboarding-bg/bg@3x.png rename to src/assets/images/onboarding-bg/bg@3x.png diff --git a/assets/images/permissions/bluetooth-disabled.png b/src/assets/images/permissions/bluetooth-disabled.png similarity index 100% rename from assets/images/permissions/bluetooth-disabled.png rename to src/assets/images/permissions/bluetooth-disabled.png diff --git a/assets/images/permissions/bluetooth-disabled@2x.png b/src/assets/images/permissions/bluetooth-disabled@2x.png similarity index 100% rename from assets/images/permissions/bluetooth-disabled@2x.png rename to src/assets/images/permissions/bluetooth-disabled@2x.png diff --git a/assets/images/permissions/bluetooth-disabled@3x.png b/src/assets/images/permissions/bluetooth-disabled@3x.png similarity index 100% rename from assets/images/permissions/bluetooth-disabled@3x.png rename to src/assets/images/permissions/bluetooth-disabled@3x.png diff --git a/assets/images/permissions/bluetooth.png b/src/assets/images/permissions/bluetooth.png similarity index 100% rename from assets/images/permissions/bluetooth.png rename to src/assets/images/permissions/bluetooth.png diff --git a/assets/images/permissions/bluetooth@2x.png b/src/assets/images/permissions/bluetooth@2x.png similarity index 100% rename from assets/images/permissions/bluetooth@2x.png rename to src/assets/images/permissions/bluetooth@2x.png diff --git a/assets/images/permissions/bluetooth@3x.png b/src/assets/images/permissions/bluetooth@3x.png similarity index 100% rename from assets/images/permissions/bluetooth@3x.png rename to src/assets/images/permissions/bluetooth@3x.png diff --git a/assets/images/permissions/notifications-disabled.png b/src/assets/images/permissions/notifications-disabled.png similarity index 100% rename from assets/images/permissions/notifications-disabled.png rename to src/assets/images/permissions/notifications-disabled.png diff --git a/assets/images/permissions/notifications-disabled@2x.png b/src/assets/images/permissions/notifications-disabled@2x.png similarity index 100% rename from assets/images/permissions/notifications-disabled@2x.png rename to src/assets/images/permissions/notifications-disabled@2x.png diff --git a/assets/images/permissions/notifications-disabled@3x.png b/src/assets/images/permissions/notifications-disabled@3x.png similarity index 100% rename from assets/images/permissions/notifications-disabled@3x.png rename to src/assets/images/permissions/notifications-disabled@3x.png diff --git a/assets/images/permissions/notifications.png b/src/assets/images/permissions/notifications.png similarity index 100% rename from assets/images/permissions/notifications.png rename to src/assets/images/permissions/notifications.png diff --git a/assets/images/permissions/notifications@2x.png b/src/assets/images/permissions/notifications@2x.png similarity index 100% rename from assets/images/permissions/notifications@2x.png rename to src/assets/images/permissions/notifications@2x.png diff --git a/assets/images/permissions/notifications@3x.png b/src/assets/images/permissions/notifications@3x.png similarity index 100% rename from assets/images/permissions/notifications@3x.png rename to src/assets/images/permissions/notifications@3x.png diff --git a/assets/images/permissions/permissions-1.png b/src/assets/images/permissions/permissions-1.png similarity index 100% rename from assets/images/permissions/permissions-1.png rename to src/assets/images/permissions/permissions-1.png diff --git a/assets/images/permissions/permissions-1@2x.png b/src/assets/images/permissions/permissions-1@2x.png similarity index 100% rename from assets/images/permissions/permissions-1@2x.png rename to src/assets/images/permissions/permissions-1@2x.png diff --git a/assets/images/permissions/permissions-1@3x.png b/src/assets/images/permissions/permissions-1@3x.png similarity index 100% rename from assets/images/permissions/permissions-1@3x.png rename to src/assets/images/permissions/permissions-1@3x.png diff --git a/assets/images/permissions/permissions-2.png b/src/assets/images/permissions/permissions-2.png similarity index 100% rename from assets/images/permissions/permissions-2.png rename to src/assets/images/permissions/permissions-2.png diff --git a/assets/images/permissions/permissions-2@2x.png b/src/assets/images/permissions/permissions-2@2x.png similarity index 100% rename from assets/images/permissions/permissions-2@2x.png rename to src/assets/images/permissions/permissions-2@2x.png diff --git a/assets/images/permissions/permissions-2@3x.png b/src/assets/images/permissions/permissions-2@3x.png similarity index 100% rename from assets/images/permissions/permissions-2@3x.png rename to src/assets/images/permissions/permissions-2@3x.png diff --git a/assets/images/permissions/permissions-4.png b/src/assets/images/permissions/permissions-4.png similarity index 100% rename from assets/images/permissions/permissions-4.png rename to src/assets/images/permissions/permissions-4.png diff --git a/assets/images/permissions/permissions-4@2x.png b/src/assets/images/permissions/permissions-4@2x.png similarity index 100% rename from assets/images/permissions/permissions-4@2x.png rename to src/assets/images/permissions/permissions-4@2x.png diff --git a/assets/images/permissions/permissions-4@3x.png b/src/assets/images/permissions/permissions-4@3x.png similarity index 100% rename from assets/images/permissions/permissions-4@3x.png rename to src/assets/images/permissions/permissions-4@3x.png diff --git a/assets/images/permissions/permissions-5.png b/src/assets/images/permissions/permissions-5.png similarity index 100% rename from assets/images/permissions/permissions-5.png rename to src/assets/images/permissions/permissions-5.png diff --git a/assets/images/permissions/permissions-5@2x.png b/src/assets/images/permissions/permissions-5@2x.png similarity index 100% rename from assets/images/permissions/permissions-5@2x.png rename to src/assets/images/permissions/permissions-5@2x.png diff --git a/assets/images/permissions/permissions-5@3x.png b/src/assets/images/permissions/permissions-5@3x.png similarity index 100% rename from assets/images/permissions/permissions-5@3x.png rename to src/assets/images/permissions/permissions-5@3x.png diff --git a/assets/images/phone/active.png b/src/assets/images/phone/active.png similarity index 100% rename from assets/images/phone/active.png rename to src/assets/images/phone/active.png diff --git a/assets/images/phone/active@2x.png b/src/assets/images/phone/active@2x.png similarity index 100% rename from assets/images/phone/active@2x.png rename to src/assets/images/phone/active@2x.png diff --git a/assets/images/phone/active@3x.png b/src/assets/images/phone/active@3x.png similarity index 100% rename from assets/images/phone/active@3x.png rename to src/assets/images/phone/active@3x.png diff --git a/assets/images/phone/not-active.png b/src/assets/images/phone/not-active.png similarity index 100% rename from assets/images/phone/not-active.png rename to src/assets/images/phone/not-active.png diff --git a/assets/images/phone/not-active@2x.png b/src/assets/images/phone/not-active@2x.png similarity index 100% rename from assets/images/phone/not-active@2x.png rename to src/assets/images/phone/not-active@2x.png diff --git a/assets/images/phone/not-active@3x.png b/src/assets/images/phone/not-active@3x.png similarity index 100% rename from assets/images/phone/not-active@3x.png rename to src/assets/images/phone/not-active@3x.png diff --git a/assets/images/privacy/privacy.png b/src/assets/images/privacy/privacy.png similarity index 100% rename from assets/images/privacy/privacy.png rename to src/assets/images/privacy/privacy.png diff --git a/assets/images/privacy/privacy@2x.png b/src/assets/images/privacy/privacy@2x.png similarity index 100% rename from assets/images/privacy/privacy@2x.png rename to src/assets/images/privacy/privacy@2x.png diff --git a/assets/images/privacy/privacy@3x.png b/src/assets/images/privacy/privacy@3x.png similarity index 100% rename from assets/images/privacy/privacy@3x.png rename to src/assets/images/privacy/privacy@3x.png diff --git a/assets/images/symptoma/image.png b/src/assets/images/symptoma/image.png similarity index 100% rename from assets/images/symptoma/image.png rename to src/assets/images/symptoma/image.png diff --git a/assets/images/symptoma/image@2x.png b/src/assets/images/symptoma/image@2x.png similarity index 100% rename from assets/images/symptoma/image@2x.png rename to src/assets/images/symptoma/image@2x.png diff --git a/assets/images/symptoma/image@3x.png b/src/assets/images/symptoma/image@3x.png similarity index 100% rename from assets/images/symptoma/image@3x.png rename to src/assets/images/symptoma/image@3x.png diff --git a/assets/images/symptomb/image.png b/src/assets/images/symptomb/image.png similarity index 100% rename from assets/images/symptomb/image.png rename to src/assets/images/symptomb/image.png diff --git a/assets/images/symptomb/image@2x.png b/src/assets/images/symptomb/image@2x.png similarity index 100% rename from assets/images/symptomb/image@2x.png rename to src/assets/images/symptomb/image@2x.png diff --git a/assets/images/symptomb/image@3x.png b/src/assets/images/symptomb/image@3x.png similarity index 100% rename from assets/images/symptomb/image@3x.png rename to src/assets/images/symptomb/image@3x.png diff --git a/assets/images/symptomc/image.png b/src/assets/images/symptomc/image.png similarity index 100% rename from assets/images/symptomc/image.png rename to src/assets/images/symptomc/image.png diff --git a/assets/images/symptomc/image@2x.png b/src/assets/images/symptomc/image@2x.png similarity index 100% rename from assets/images/symptomc/image@2x.png rename to src/assets/images/symptomc/image@2x.png diff --git a/assets/images/symptomc/image@3x.png b/src/assets/images/symptomc/image@3x.png similarity index 100% rename from assets/images/symptomc/image@3x.png rename to src/assets/images/symptomc/image@3x.png diff --git a/assets/images/symptomd/image.png b/src/assets/images/symptomd/image.png similarity index 100% rename from assets/images/symptomd/image.png rename to src/assets/images/symptomd/image.png diff --git a/assets/images/symptomd/image@2x.png b/src/assets/images/symptomd/image@2x.png similarity index 100% rename from assets/images/symptomd/image@2x.png rename to src/assets/images/symptomd/image@2x.png diff --git a/assets/images/symptomd/image@3x.png b/src/assets/images/symptomd/image@3x.png similarity index 100% rename from assets/images/symptomd/image@3x.png rename to src/assets/images/symptomd/image@3x.png diff --git a/assets/images/symptoms-history/1_temp.png b/src/assets/images/symptoms-history/1_temp.png similarity index 100% rename from assets/images/symptoms-history/1_temp.png rename to src/assets/images/symptoms-history/1_temp.png diff --git a/assets/images/symptoms-history/1_temp@2x.png b/src/assets/images/symptoms-history/1_temp@2x.png similarity index 100% rename from assets/images/symptoms-history/1_temp@2x.png rename to src/assets/images/symptoms-history/1_temp@2x.png diff --git a/assets/images/symptoms-history/1_temp@3x.png b/src/assets/images/symptoms-history/1_temp@3x.png similarity index 100% rename from assets/images/symptoms-history/1_temp@3x.png rename to src/assets/images/symptoms-history/1_temp@3x.png diff --git a/assets/images/symptoms-history/2_cough.png b/src/assets/images/symptoms-history/2_cough.png similarity index 100% rename from assets/images/symptoms-history/2_cough.png rename to src/assets/images/symptoms-history/2_cough.png diff --git a/assets/images/symptoms-history/2_cough@2x.png b/src/assets/images/symptoms-history/2_cough@2x.png similarity index 100% rename from assets/images/symptoms-history/2_cough@2x.png rename to src/assets/images/symptoms-history/2_cough@2x.png diff --git a/assets/images/symptoms-history/2_cough@3x.png b/src/assets/images/symptoms-history/2_cough@3x.png similarity index 100% rename from assets/images/symptoms-history/2_cough@3x.png rename to src/assets/images/symptoms-history/2_cough@3x.png diff --git a/assets/images/symptoms-history/3_shortness.png b/src/assets/images/symptoms-history/3_shortness.png similarity index 100% rename from assets/images/symptoms-history/3_shortness.png rename to src/assets/images/symptoms-history/3_shortness.png diff --git a/assets/images/symptoms-history/3_shortness@2x.png b/src/assets/images/symptoms-history/3_shortness@2x.png similarity index 100% rename from assets/images/symptoms-history/3_shortness@2x.png rename to src/assets/images/symptoms-history/3_shortness@2x.png diff --git a/assets/images/symptoms-history/3_shortness@3x.png b/src/assets/images/symptoms-history/3_shortness@3x.png similarity index 100% rename from assets/images/symptoms-history/3_shortness@3x.png rename to src/assets/images/symptoms-history/3_shortness@3x.png diff --git a/assets/images/symptoms-history/4_nose.png b/src/assets/images/symptoms-history/4_nose.png similarity index 100% rename from assets/images/symptoms-history/4_nose.png rename to src/assets/images/symptoms-history/4_nose.png diff --git a/assets/images/symptoms-history/4_nose@2x.png b/src/assets/images/symptoms-history/4_nose@2x.png similarity index 100% rename from assets/images/symptoms-history/4_nose@2x.png rename to src/assets/images/symptoms-history/4_nose@2x.png diff --git a/assets/images/symptoms-history/4_nose@3x.png b/src/assets/images/symptoms-history/4_nose@3x.png similarity index 100% rename from assets/images/symptoms-history/4_nose@3x.png rename to src/assets/images/symptoms-history/4_nose@3x.png diff --git a/assets/images/under16-1/image.png b/src/assets/images/under16-1/image.png similarity index 100% rename from assets/images/under16-1/image.png rename to src/assets/images/under16-1/image.png diff --git a/assets/images/under16-1/image@2x.png b/src/assets/images/under16-1/image@2x.png similarity index 100% rename from assets/images/under16-1/image@2x.png rename to src/assets/images/under16-1/image@2x.png diff --git a/assets/images/under16-1/image@3x.png b/src/assets/images/under16-1/image@3x.png similarity index 100% rename from assets/images/under16-1/image@3x.png rename to src/assets/images/under16-1/image@3x.png diff --git a/assets/lang/en.json b/src/assets/lang/en.json similarity index 100% rename from assets/lang/en.json rename to src/assets/lang/en.json diff --git a/assets/lang/ga.json b/src/assets/lang/ga.json similarity index 100% rename from assets/lang/ga.json rename to src/assets/lang/ga.json diff --git a/assets/localities.ts b/src/assets/localities.ts similarity index 100% rename from assets/localities.ts rename to src/assets/localities.ts diff --git a/assets/splash.png b/src/assets/splash.png similarity index 100% rename from assets/splash.png rename to src/assets/splash.png diff --git a/components/atoms/button.tsx b/src/components/atoms/button.tsx similarity index 96% rename from components/atoms/button.tsx rename to src/components/atoms/button.tsx index d81680d4..b22c34d0 100644 --- a/components/atoms/button.tsx +++ b/src/components/atoms/button.tsx @@ -8,8 +8,7 @@ import { Dimensions } from 'react-native'; -import {colors} from '../../constants/colors'; -import {text, scale} from '../../theme'; +import {text, scale, colors} from 'theme'; interface ButtonProps { type?: 'default' | 'empty' | 'danger'; diff --git a/components/atoms/card.tsx b/src/components/atoms/card.tsx similarity index 92% rename from components/atoms/card.tsx rename to src/components/atoms/card.tsx index 85c4ed9d..e51eb708 100644 --- a/components/atoms/card.tsx +++ b/src/components/atoms/card.tsx @@ -1,9 +1,8 @@ import React, {ReactNode, FC} from 'react'; import {StyleSheet, TouchableWithoutFeedback, View} from 'react-native'; -import {colors} from '../../constants/colors'; -import {shadows} from '../../theme'; -import {AppIcons} from '../../assets/icons'; +import {colors, shadows} from 'theme'; +import {AppIcons} from 'assets/icons'; interface CardProps { type?: 'warning'; diff --git a/components/atoms/dropdown/index.tsx b/src/components/atoms/dropdown/index.tsx similarity index 93% rename from components/atoms/dropdown/index.tsx rename to src/components/atoms/dropdown/index.tsx index 157957af..065499d8 100644 --- a/components/atoms/dropdown/index.tsx +++ b/src/components/atoms/dropdown/index.tsx @@ -3,15 +3,13 @@ import { Text, View, TouchableWithoutFeedback, - StyleSheet, - Image + StyleSheet } from 'react-native'; import {DropdownModal} from './modal'; -import {colors} from '../../../constants/colors'; -import {Spacing} from '../spacing'; -import {text} from '../../../theme'; -import {AppIcons} from '../../../assets/icons'; +import {Spacing} from 'components/atoms/spacing'; +import {text, colors} from 'theme'; +import {AppIcons} from 'assets/icons'; interface DropdownProps { label?: string; diff --git a/components/atoms/dropdown/modal.tsx b/src/components/atoms/dropdown/modal.tsx similarity index 96% rename from components/atoms/dropdown/modal.tsx rename to src/components/atoms/dropdown/modal.tsx index 5160504f..07500d61 100644 --- a/components/atoms/dropdown/modal.tsx +++ b/src/components/atoms/dropdown/modal.tsx @@ -12,11 +12,9 @@ import { import Modal, {ModalProps} from 'react-native-modal'; import {useSafeArea} from 'react-native-safe-area-context'; -import {Spacing} from '../layout'; - -import {colors} from '../../../constants/colors'; -import {text} from '../../../theme'; -import Icons, {AppIcons} from '../../../assets/icons'; +import {Spacing} from 'components/atoms/layout'; +import {colors, text} from 'theme'; +import Icons, {AppIcons} from 'assets/icons'; interface DropdownModalProps extends Partial { title: string; diff --git a/components/atoms/heading.tsx b/src/components/atoms/heading.tsx similarity index 95% rename from components/atoms/heading.tsx rename to src/components/atoms/heading.tsx index 1f16e211..e67138f4 100644 --- a/components/atoms/heading.tsx +++ b/src/components/atoms/heading.tsx @@ -6,11 +6,11 @@ import { findNodeHandle, AccessibilityInfo } from 'react-native'; +import {useFocusEffect, useIsFocused} from '@react-navigation/native'; import {Spacing} from './spacing'; -import {text as textStyles} from '../../theme'; -import {colors} from '../../constants/colors'; -import {useFocusEffect, useIsFocused} from '@react-navigation/native'; + +import {text as textStyles, colors} from 'theme'; interface HeadingProps { text: string; diff --git a/components/atoms/layout.tsx b/src/components/atoms/layout.tsx similarity index 96% rename from components/atoms/layout.tsx rename to src/components/atoms/layout.tsx index 3e76dcc9..07a7e6c3 100644 --- a/components/atoms/layout.tsx +++ b/src/components/atoms/layout.tsx @@ -1,7 +1,7 @@ import React, {FC} from 'react'; import {View, StyleSheet} from 'react-native'; -import {scale} from '../../theme'; +import {scale} from 'theme'; export const Spacing: React.FC<{s: number}> = ({s}) => { const height = scale(s); diff --git a/components/atoms/link.tsx b/src/components/atoms/link.tsx similarity index 93% rename from components/atoms/link.tsx rename to src/components/atoms/link.tsx index 9461b06b..bf575050 100644 --- a/components/atoms/link.tsx +++ b/src/components/atoms/link.tsx @@ -7,8 +7,7 @@ import { ViewStyle } from 'react-native'; -import {text as textStyles} from '../../theme'; -import {colors} from '../../constants/colors'; +import {text as textStyles, colors} from 'theme'; interface LinkProps { style?: ViewStyle; diff --git a/components/atoms/markdown.tsx b/src/components/atoms/markdown.tsx similarity index 94% rename from components/atoms/markdown.tsx rename to src/components/atoms/markdown.tsx index d2d0139f..ff7d3e63 100644 --- a/components/atoms/markdown.tsx +++ b/src/components/atoms/markdown.tsx @@ -4,10 +4,8 @@ import {useNavigation} from '@react-navigation/native'; import * as WebBrowser from 'expo-web-browser'; import M from 'react-native-easy-markdown'; -import {Link} from '../atoms/link'; - -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; +import {Link} from 'components/atoms/link'; +import {text, colors} from 'theme'; interface Markdown { style?: object; diff --git a/components/atoms/navbar.tsx b/src/components/atoms/navbar.tsx similarity index 94% rename from components/atoms/navbar.tsx rename to src/components/atoms/navbar.tsx index 3067c4f3..01d22e99 100644 --- a/components/atoms/navbar.tsx +++ b/src/components/atoms/navbar.tsx @@ -9,10 +9,9 @@ import { import {useTranslation} from 'react-i18next'; import {useSafeArea} from 'react-native-safe-area-context'; -import {text} from '../../theme'; -import {colors} from '../../constants/colors' -import {useApplication} from '../../providers/context'; -import Icons, {AppIcons, TabBarIcons} from '../../assets/icons'; +import Icons, {AppIcons, TabBarIcons} from 'assets/icons'; +import {colors, text} from 'theme'; +import {useApplication} from 'providers/context'; interface NavBarProps { navigation: any; @@ -65,7 +64,7 @@ export const NavBar: FC = ({navigation, scene, placeholder}) => { } ]} resizeMode="cover" - source={require('../../assets/headerbg.png')} + source={require('assets/headerbg.png')} accessibilityIgnoresInvertColors={false} /> diff --git a/components/atoms/progress.tsx b/src/components/atoms/progress.tsx similarity index 95% rename from components/atoms/progress.tsx rename to src/components/atoms/progress.tsx index 25d47348..e9caa00a 100644 --- a/components/atoms/progress.tsx +++ b/src/components/atoms/progress.tsx @@ -1,7 +1,7 @@ import React from 'react'; import {StyleSheet, View, ViewStyle} from 'react-native'; -import {colors} from '../../constants/colors'; +import {colors} from 'theme'; interface ProgressProps { value: number; diff --git a/components/atoms/responsive-image.tsx b/src/components/atoms/responsive-image.tsx similarity index 93% rename from components/atoms/responsive-image.tsx rename to src/components/atoms/responsive-image.tsx index 1f468a0f..d30f2a44 100644 --- a/components/atoms/responsive-image.tsx +++ b/src/components/atoms/responsive-image.tsx @@ -1,6 +1,7 @@ import React from 'react'; import {Image, ImagePropsBase} from 'react-native'; -import {scale} from '../../theme'; + +import {scale} from 'theme'; interface ResponsiveImageProps extends ImagePropsBase { w?: number; diff --git a/components/atoms/select-list.tsx b/src/components/atoms/select-list.tsx similarity index 94% rename from components/atoms/select-list.tsx rename to src/components/atoms/select-list.tsx index 143bf545..36e55112 100644 --- a/components/atoms/select-list.tsx +++ b/src/components/atoms/select-list.tsx @@ -5,9 +5,9 @@ import { View, Text, } from 'react-native'; -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; -import Icons from '../../assets/icons'; + +import {colors, text} from 'theme'; +import Icons from 'assets/icons'; interface ListItem { value: any; diff --git a/components/atoms/spacing.tsx b/src/components/atoms/spacing.tsx similarity index 84% rename from components/atoms/spacing.tsx rename to src/components/atoms/spacing.tsx index 8279fac3..ee2c0b6f 100644 --- a/components/atoms/spacing.tsx +++ b/src/components/atoms/spacing.tsx @@ -1,6 +1,7 @@ import React from 'react'; import {View} from 'react-native'; -import {scale} from '../../theme'; + +import {scale} from 'theme'; export const Spacing: React.FC<{s: number}> = ({s}) => { const height = scale(s); diff --git a/components/atoms/toast.tsx b/src/components/atoms/toast.tsx similarity index 95% rename from components/atoms/toast.tsx rename to src/components/atoms/toast.tsx index d05d3977..7bffe802 100644 --- a/components/atoms/toast.tsx +++ b/src/components/atoms/toast.tsx @@ -9,8 +9,7 @@ import { import {Markdown} from './markdown'; -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; +import {text, colors} from 'theme'; interface ToastProps { type?: string; diff --git a/components/molecules/area-chart.tsx b/src/components/molecules/area-chart.tsx similarity index 97% rename from components/molecules/area-chart.tsx rename to src/components/molecules/area-chart.tsx index 9db8dd09..90542923 100644 --- a/components/molecules/area-chart.tsx +++ b/src/components/molecules/area-chart.tsx @@ -5,9 +5,8 @@ import {AreaChart, YAxis, Grid} from 'react-native-svg-charts'; import {differenceInDays, format} from 'date-fns'; import * as shape from 'd3-shape'; -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; -import {ConfirmedCasesData} from '../../services/api'; +import {ConfirmedCasesData} from 'services/api'; +import {text, colors} from 'theme'; interface TrackerAreaChartProps { title?: string; diff --git a/components/molecules/check-in-card.tsx b/src/components/molecules/check-in-card.tsx similarity index 91% rename from components/molecules/check-in-card.tsx rename to src/components/molecules/check-in-card.tsx index b66c649c..204a6a97 100644 --- a/components/molecules/check-in-card.tsx +++ b/src/components/molecules/check-in-card.tsx @@ -3,17 +3,15 @@ import { StyleSheet, View, Text, - Image, findNodeHandle, AccessibilityInfo } from 'react-native'; -import {Card} from '../atoms/card'; - -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; import {useTranslation} from 'react-i18next'; import {useIsFocused, useFocusEffect} from '@react-navigation/native'; -import {BubbleIcons} from '../../assets/icons'; + +import {Card} from 'components/atoms/card'; +import {colors, text} from 'theme'; +import {BubbleIcons} from 'assets/icons'; interface CheckInCardProps { onPress?: () => void; diff --git a/components/molecules/checkin-consent.tsx b/src/components/molecules/checkin-consent.tsx similarity index 82% rename from components/molecules/checkin-consent.tsx rename to src/components/molecules/checkin-consent.tsx index d4b5376f..ebb37cff 100644 --- a/components/molecules/checkin-consent.tsx +++ b/src/components/molecules/checkin-consent.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { - Image, Text, View, StyleSheet, @@ -8,16 +7,13 @@ import { } from 'react-native'; import {useTranslation} from 'react-i18next'; -import {useApplication} from '../../providers/context'; -import {DataProtectionLink} from '../views/data-protection-policy'; - -import {Spacing} from '../atoms/spacing'; -import {Button} from '../atoms/button'; -import {Markdown} from '../atoms/markdown'; - -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; -import {AppIcons} from '../../assets/icons'; +import {AppIcons} from 'assets/icons'; +import {Button} from 'components/atoms/button'; +import {colors, text} from 'theme'; +import {DataProtectionLink} from 'components/views/data-protection-policy'; +import {Markdown} from 'components/atoms/markdown'; +import {Spacing} from 'components/atoms/spacing'; +import {useApplication} from 'providers/context'; interface CheckInConsentProps { onDismissed?: () => void; diff --git a/components/molecules/close-contact-warning.tsx b/src/components/molecules/close-contact-warning.tsx similarity index 86% rename from components/molecules/close-contact-warning.tsx rename to src/components/molecules/close-contact-warning.tsx index 0b8da0b2..b7fe4fef 100644 --- a/components/molecules/close-contact-warning.tsx +++ b/src/components/molecules/close-contact-warning.tsx @@ -9,12 +9,9 @@ import { import {useTranslation} from 'react-i18next'; import {useNavigation} from '@react-navigation/native'; -import {SingleRow} from '../atoms/layout'; - -import {colors} from '../../constants/colors'; - -import {shadows, text} from '../../theme'; -import { AppIcons } from '../../assets/icons'; +import {AppIcons} from 'assets/icons'; +import {colors, shadows, text} from 'theme'; +import {SingleRow} from 'components/atoms/layout'; export const CloseContactWarning: FC = () => { const {t} = useTranslation(); @@ -30,7 +27,7 @@ export const CloseContactWarning: FC = () => { style={styles.imageSize} width={styles.imageSize.width} height={styles.imageSize.height} - source={require('../../assets/images/exposure-alert/exposure-alert.png')} + source={require('assets/images/exposure-alert/exposure-alert.png')} /> diff --git a/components/molecules/code-input.tsx b/src/components/molecules/code-input.tsx similarity index 97% rename from components/molecules/code-input.tsx rename to src/components/molecules/code-input.tsx index 9cdb7904..31bcec2c 100644 --- a/components/molecules/code-input.tsx +++ b/src/components/molecules/code-input.tsx @@ -9,8 +9,7 @@ import { } from 'react-native'; import {useTranslation} from 'react-i18next'; -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; +import {text, colors} from 'theme'; interface CodeInputProps { style?: ViewStyle; diff --git a/components/molecules/country-code-dropdown.tsx b/src/components/molecules/country-code-dropdown.tsx similarity index 90% rename from components/molecules/country-code-dropdown.tsx rename to src/components/molecules/country-code-dropdown.tsx index 549790b7..a5cfc0ea 100644 --- a/components/molecules/country-code-dropdown.tsx +++ b/src/components/molecules/country-code-dropdown.tsx @@ -2,11 +2,9 @@ import React, {FC, useState} from 'react'; import {StyleSheet, View, Text} from 'react-native'; import {useTranslation} from 'react-i18next'; -import countryCodes from '../../assets/country-codes'; - -import {Dropdown} from '../atoms/dropdown'; -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; +import countryCodes from 'assets/country-codes'; +import {Dropdown} from 'components/atoms/dropdown'; +import {text, colors} from 'theme'; const countryCodeItems = countryCodes.map((cc) => ({ ...cc, diff --git a/components/molecules/county-breakdown-card.tsx b/src/components/molecules/county-breakdown-card.tsx similarity index 82% rename from components/molecules/county-breakdown-card.tsx rename to src/components/molecules/county-breakdown-card.tsx index f0343b67..b2025501 100644 --- a/components/molecules/county-breakdown-card.tsx +++ b/src/components/molecules/county-breakdown-card.tsx @@ -1,12 +1,10 @@ import React, {FC} from 'react'; -import {StyleSheet, View, Image, Text} from 'react-native'; +import {StyleSheet, View, Text} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {Card} from '../atoms/card'; - -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; -import {BubbleIcons} from '../../assets/icons'; +import {BubbleIcons} from 'assets/icons'; +import {Card} from 'components/atoms/card'; +import {colors, text} from 'theme'; interface CountyBreakdownCardProps { onPress: () => void; diff --git a/components/molecules/locality-dropdown.tsx b/src/components/molecules/locality-dropdown.tsx similarity index 95% rename from components/molecules/locality-dropdown.tsx rename to src/components/molecules/locality-dropdown.tsx index 84814e13..f4981aef 100644 --- a/components/molecules/locality-dropdown.tsx +++ b/src/components/molecules/locality-dropdown.tsx @@ -1,14 +1,12 @@ import React, {FC, useState} from 'react'; import {useTranslation} from 'react-i18next'; - -import {localities} from '../../assets/localities'; - -import {UserLocation} from '../../providers/context'; - -import {Separator} from '../atoms/layout'; -import {Dropdown} from '../atoms/dropdown'; import {TFunction} from 'i18next'; +import {Dropdown} from 'components/atoms/dropdown'; +import {localities} from 'assets/localities'; +import {Separator} from 'components/atoms/layout'; +import {UserLocation} from 'providers/context'; + interface CountyOption { label: string; value: string; diff --git a/components/molecules/quick-checkin.tsx b/src/components/molecules/quick-checkin.tsx similarity index 93% rename from components/molecules/quick-checkin.tsx rename to src/components/molecules/quick-checkin.tsx index 4b3fcb01..5a5bdf5a 100644 --- a/components/molecules/quick-checkin.tsx +++ b/src/components/molecules/quick-checkin.tsx @@ -1,23 +1,17 @@ import React, {useRef, useEffect, FC} from 'react'; -import { - Text, - View, - TouchableWithoutFeedback, - Animated -} from 'react-native'; +import {Text, View, TouchableWithoutFeedback, Animated} from 'react-native'; import {useNavigation} from '@react-navigation/native'; import {useTranslation} from 'react-i18next'; import {TFunction} from 'i18next'; -import {Spacing} from '../atoms/spacing'; -import {Button} from '../atoms/button'; -import {Link} from '../atoms/link'; - import {styles} from './checkin-consent'; -import {useApplication} from '../../providers/context'; -import {text} from '../../theme'; -import {AppIcons} from '../../assets/icons'; +import {AppIcons} from 'assets/icons'; +import {Button} from 'components/atoms/button'; +import {Link} from 'components/atoms/link'; +import {Spacing} from 'components/atoms/spacing'; +import {text} from 'theme'; +import {useApplication} from 'providers/context'; interface Props { onDismissed: () => void; diff --git a/components/molecules/quote.tsx b/src/components/molecules/quote.tsx similarity index 87% rename from components/molecules/quote.tsx rename to src/components/molecules/quote.tsx index 0d9c76f0..735af79b 100644 --- a/components/molecules/quote.tsx +++ b/src/components/molecules/quote.tsx @@ -1,8 +1,7 @@ import React, {FC} from 'react'; import {StyleSheet, ViewStyle, View, Text} from 'react-native'; -import {colors} from '../../constants/colors'; -import {text as textStyles} from '../../theme'; +import {text as textStyles, colors} from 'theme'; interface QuoteProps { style?: ViewStyle; diff --git a/components/molecules/result-card.tsx b/src/components/molecules/result-card.tsx similarity index 93% rename from components/molecules/result-card.tsx rename to src/components/molecules/result-card.tsx index 326c2685..3f337c90 100644 --- a/components/molecules/result-card.tsx +++ b/src/components/molecules/result-card.tsx @@ -4,14 +4,11 @@ import {useNavigation} from '@react-navigation/native'; import {useTranslation} from 'react-i18next'; import * as WebBrowser from 'expo-web-browser'; -import {useSettings} from '../../providers/settings'; - -import {Button} from '../atoms/button'; -import {Markdown} from '../atoms/markdown'; -import {Spacing} from '../atoms/spacing'; - -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; +import {Button} from 'components/atoms/button'; +import {Markdown} from 'components/atoms/markdown'; +import {Spacing} from 'components/atoms/spacing'; +import {text, colors} from 'theme'; +import {useSettings} from 'providers/settings'; const urlsMap = { noSymptomsWell: 'https://www2.hse.ie/app/in-app-good', diff --git a/components/molecules/stats-card.tsx b/src/components/molecules/stats-card.tsx similarity index 93% rename from components/molecules/stats-card.tsx rename to src/components/molecules/stats-card.tsx index b6273bc2..406bf75a 100644 --- a/components/molecules/stats-card.tsx +++ b/src/components/molecules/stats-card.tsx @@ -8,8 +8,7 @@ import { ImageRequireSource } from 'react-native'; -import {colors} from '../../constants/colors'; -import {shadows, text} from '../../theme'; +import {shadows, text, colors} from 'theme'; interface StatsCardProps { style?: ViewStyle; diff --git a/components/molecules/stats-source.tsx b/src/components/molecules/stats-source.tsx similarity index 96% rename from components/molecules/stats-source.tsx rename to src/components/molecules/stats-source.tsx index fea51c7f..450cd74b 100644 --- a/components/molecules/stats-source.tsx +++ b/src/components/molecules/stats-source.tsx @@ -3,7 +3,7 @@ import {StyleSheet, View, ViewStyle, Text} from 'react-native'; import {useTranslation} from 'react-i18next'; import {format} from 'date-fns'; -import {text} from '../../theme'; +import {text} from 'theme'; interface StatsSourceProps { style?: ViewStyle; diff --git a/components/molecules/tracing-available.tsx b/src/components/molecules/tracing-available.tsx similarity index 84% rename from components/molecules/tracing-available.tsx rename to src/components/molecules/tracing-available.tsx index 3b9f5fef..0fb28460 100644 --- a/components/molecules/tracing-available.tsx +++ b/src/components/molecules/tracing-available.tsx @@ -9,14 +9,11 @@ import { import {useTranslation} from 'react-i18next'; import {useNavigation} from '@react-navigation/native'; -import {SingleRow} from '../atoms/layout'; +import {SingleRow} from 'components/atoms/layout'; +import {colors, shadows, text} from 'theme'; +import {AppIcons} from 'assets/icons'; -import {colors} from '../../constants/colors'; - -import {shadows, text} from '../../theme'; -import { AppIcons } from '../../assets/icons'; - -const TracingImage = require('../../assets/images/information/alt.png'); +const TracingImage = require('assets/images/information/alt.png'); export const TracingAvailable: FC = () => { const {t} = useTranslation(); @@ -39,7 +36,7 @@ export const TracingAvailable: FC = () => { - + diff --git a/components/molecules/transmission-chart.tsx b/src/components/molecules/transmission-chart.tsx similarity index 95% rename from components/molecules/transmission-chart.tsx rename to src/components/molecules/transmission-chart.tsx index e1e859f8..349ca029 100644 --- a/components/molecules/transmission-chart.tsx +++ b/src/components/molecules/transmission-chart.tsx @@ -1,8 +1,7 @@ import React, {FC} from 'react'; import {StyleSheet, View, ViewStyle, Text} from 'react-native'; -import {colors} from '../../constants/colors'; -import {shadows, text} from '../../theme'; +import {colors, shadows, text} from 'theme'; interface TransmissionChartProps { style?: ViewStyle; @@ -57,7 +56,6 @@ const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#FFFFFF', - borderRadius: 3, padding: 16, ...shadows.default }, diff --git a/components/organisms/app-stats.tsx b/src/components/organisms/app-stats.tsx similarity index 90% rename from components/organisms/app-stats.tsx rename to src/components/organisms/app-stats.tsx index bca48676..5e070ce5 100644 --- a/components/organisms/app-stats.tsx +++ b/src/components/organisms/app-stats.tsx @@ -2,14 +2,12 @@ import React, {FC} from 'react'; import {StyleSheet, View, Text} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {Spacing} from '../atoms/layout'; -import {Heading} from '../atoms/heading'; -import {Card} from '../atoms/card'; -import {Progress} from '../atoms/progress'; - -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; -import {BubbleIcons} from '../../assets/icons'; +import {Spacing} from 'components/atoms/layout'; +import {Heading} from 'components/atoms/heading'; +import {Card} from 'components/atoms/card'; +import {Progress} from 'components/atoms/progress'; +import {colors, text} from 'theme'; +import {BubbleIcons} from 'assets/icons'; export interface AppStats { totalCheckins: number; diff --git a/components/organisms/covid-stats.tsx b/src/components/organisms/covid-stats.tsx similarity index 89% rename from components/organisms/covid-stats.tsx rename to src/components/organisms/covid-stats.tsx index db2dbeda..6f7c35b5 100644 --- a/components/organisms/covid-stats.tsx +++ b/src/components/organisms/covid-stats.tsx @@ -1,16 +1,13 @@ import React, {FC} from 'react'; -import {StyleSheet, View, ViewStyle, Image, Text} from 'react-native'; +import {StyleSheet, View, ViewStyle, Text} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {CovidStatistics} from '../../services/api'; - -import {Spacing} from '../atoms/spacing'; -import {Heading} from '../atoms/heading'; -import {CountyBreakdownCard} from '../molecules/county-breakdown-card'; - -import {colors} from '../../constants/colors'; -import {shadows, text} from '../../theme'; -import {BubbleIcons} from '../../assets/icons'; +import {CovidStatistics} from 'services/api'; +import {Spacing} from 'components/atoms/spacing'; +import {Heading} from 'components/atoms/heading'; +import {CountyBreakdownCard} from 'components/molecules/county-breakdown-card'; +import {colors, shadows, text} from 'theme'; +import {BubbleIcons} from 'assets/icons'; interface CovidStatsProps { style?: ViewStyle; diff --git a/components/organisms/phone-number.tsx b/src/components/organisms/phone-number.tsx similarity index 92% rename from components/organisms/phone-number.tsx rename to src/components/organisms/phone-number.tsx index 03069ff5..ff84a9ae 100644 --- a/components/organisms/phone-number.tsx +++ b/src/components/organisms/phone-number.tsx @@ -6,16 +6,12 @@ import * as Yup from 'yup'; import phone from 'phone'; import * as Haptics from 'expo-haptics'; -import {Spacing, Separator} from '../atoms/layout'; -import {Button} from '../atoms/button'; -import {CountryCodeDropdown} from '../molecules/country-code-dropdown'; - -import {useApplication} from '../../providers/context'; - -import {colors} from '../../constants/colors'; -import {baseStyles, inputStyle} from '../../theme'; - -import countryCodes from '../../assets/country-codes'; +import countryCodes from 'assets/country-codes'; +import {Button} from 'components/atoms/button'; +import {colors, baseStyles, inputStyle} from 'theme'; +import {CountryCodeDropdown} from 'components/molecules/country-code-dropdown'; +import {Spacing, Separator} from 'components/atoms/layout'; +import {useApplication} from 'providers/context'; interface PhoneNumberValues { iso: string; diff --git a/components/organisms/tab-bar-bottom.tsx b/src/components/organisms/tab-bar-bottom.tsx similarity index 94% rename from components/organisms/tab-bar-bottom.tsx rename to src/components/organisms/tab-bar-bottom.tsx index 5cacd159..a75389f1 100644 --- a/components/organisms/tab-bar-bottom.tsx +++ b/src/components/organisms/tab-bar-bottom.tsx @@ -11,11 +11,9 @@ import {TFunction} from 'i18next'; import {useTranslation} from 'react-i18next'; import Constants from 'expo-constants'; -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; -import {useExposure, StatusState} from '../../providers/exposure'; -import {TabBarIcons, AppIcons} from '../../assets/icons'; -import {getActionFromState} from '@react-navigation/native'; +import {colors, text} from 'theme'; +import {TabBarIcons, AppIcons} from 'assets/icons'; +import {useExposure, StatusState} from 'providers/exposure'; export const shareApp = async (t: TFunction) => { try { diff --git a/components/splash.png b/src/components/splash.png similarity index 100% rename from components/splash.png rename to src/components/splash.png diff --git a/components/templates/base.tsx b/src/components/templates/base.tsx similarity index 86% rename from components/templates/base.tsx rename to src/components/templates/base.tsx index 397caf1b..2fdfb011 100644 --- a/components/templates/base.tsx +++ b/src/components/templates/base.tsx @@ -1,7 +1,7 @@ import React from 'react'; import {StyleSheet, View} from 'react-native'; -import {colors} from '../../constants/colors'; +import {colors} from 'theme'; export const Base: React.FC = ({children}) => { return {children}; diff --git a/components/templates/basic.tsx b/src/components/templates/basic.tsx similarity index 82% rename from components/templates/basic.tsx rename to src/components/templates/basic.tsx index fb67279f..606a01f9 100644 --- a/components/templates/basic.tsx +++ b/src/components/templates/basic.tsx @@ -2,9 +2,13 @@ import React, {FC} from 'react'; import {StyleSheet, View} from 'react-native'; import {useSafeArea} from 'react-native-safe-area-context'; -import {SPACING_TOP, SPACING_BOTTOM, SPACING_HORIZONTAL} from './shared'; -import {Heading} from '../atoms/heading'; -import {colors} from '../../constants/colors'; +import { + SPACING_TOP, + SPACING_BOTTOM, + SPACING_HORIZONTAL +} from 'constants/shared'; +import {Heading} from 'components/atoms/heading'; +import {colors} from 'theme'; interface LayoutProps { heading?: string; diff --git a/components/templates/keyboard-scrollable.tsx b/src/components/templates/keyboard-scrollable.tsx similarity index 89% rename from components/templates/keyboard-scrollable.tsx rename to src/components/templates/keyboard-scrollable.tsx index f3aef3a9..6f60f400 100644 --- a/components/templates/keyboard-scrollable.tsx +++ b/src/components/templates/keyboard-scrollable.tsx @@ -9,10 +9,14 @@ import { import {useHeaderHeight} from '@react-navigation/stack'; import {useSafeArea} from 'react-native-safe-area-context'; -import {SPACING_TOP, SPACING_BOTTOM, SPACING_HORIZONTAL} from './shared'; -import {Spacing} from '../atoms/layout'; -import {Heading} from '../atoms/heading'; -import {colors} from '../../constants/colors'; +import { + SPACING_TOP, + SPACING_BOTTOM, + SPACING_HORIZONTAL +} from 'constants/shared'; +import {colors} from 'theme'; +import {Heading} from 'components/atoms/heading'; +import {Spacing} from 'components/atoms/layout'; interface LayoutProps { toast?: React.ReactNode; diff --git a/components/templates/pinned.tsx b/src/components/templates/pinned.tsx similarity index 84% rename from components/templates/pinned.tsx rename to src/components/templates/pinned.tsx index fff04d4a..23ca8153 100644 --- a/components/templates/pinned.tsx +++ b/src/components/templates/pinned.tsx @@ -2,9 +2,13 @@ import React, {FC} from 'react'; import {StyleSheet, View} from 'react-native'; import {useSafeArea} from 'react-native-safe-area-context'; -import {SPACING_TOP, SPACING_BOTTOM, SPACING_HORIZONTAL} from './shared'; -import {Heading} from '../atoms/heading'; -import {colors} from '../../constants/colors'; +import { + SPACING_TOP, + SPACING_BOTTOM, + SPACING_HORIZONTAL +} from 'constants/shared'; +import {colors} from 'theme'; +import {Heading} from 'components/atoms/heading'; interface LayoutProps { heading?: string; diff --git a/components/templates/scrollable.tsx b/src/components/templates/scrollable.tsx similarity index 89% rename from components/templates/scrollable.tsx rename to src/components/templates/scrollable.tsx index b17047b3..93165a63 100644 --- a/components/templates/scrollable.tsx +++ b/src/components/templates/scrollable.tsx @@ -2,10 +2,14 @@ import React, {FC, MutableRefObject} from 'react'; import {StyleSheet, View, ScrollView, RefreshControl} from 'react-native'; import {useSafeArea} from 'react-native-safe-area-context'; -import {SPACING_TOP, SPACING_BOTTOM, SPACING_HORIZONTAL} from './shared'; -import {Spacing} from '../atoms/layout'; -import {Heading} from '../atoms/heading'; -import {colors} from '../../constants/colors'; +import { + SPACING_TOP, + SPACING_BOTTOM, + SPACING_HORIZONTAL +} from 'constants/shared'; +import {colors} from 'theme'; +import {Heading} from 'components/atoms/heading'; +import {Spacing} from 'components/atoms/layout'; interface LayoutProps { toast?: React.ReactNode; diff --git a/components/views/app-usage.tsx b/src/components/views/app-usage.tsx similarity index 79% rename from components/views/app-usage.tsx rename to src/components/views/app-usage.tsx index 1c0c2047..14b58c56 100644 --- a/components/views/app-usage.tsx +++ b/src/components/views/app-usage.tsx @@ -4,13 +4,12 @@ import * as SecureStore from 'expo-secure-store'; import {DataProtectionLink} from './data-protection-policy'; -import {Spacing} from '../atoms/spacing'; -import {Button} from '../atoms/button'; -import {Link} from '../atoms/link'; -import {Markdown} from '../atoms/markdown'; -import {Quote} from '../molecules/quote'; - -import {Scrollable} from '../templates/scrollable'; +import {Button} from 'components/atoms/button'; +import {Link} from 'components/atoms/link'; +import {Markdown} from 'components/atoms/markdown'; +import {Quote} from 'components/molecules/quote'; +import {Spacing} from 'components/atoms/spacing'; +import {Scrollable} from 'components/templates/scrollable'; interface AppUsageProps { navigation: any; diff --git a/components/views/close-contact.tsx b/src/components/views/close-contact.tsx similarity index 81% rename from components/views/close-contact.tsx rename to src/components/views/close-contact.tsx index 1fff4aa3..6c8767bd 100644 --- a/components/views/close-contact.tsx +++ b/src/components/views/close-contact.tsx @@ -1,19 +1,17 @@ import React, {FC} from 'react'; import {StyleSheet, Text, Linking} from 'react-native'; import {useTranslation} from 'react-i18next'; - -import {useApplication} from '../../providers/context'; - -import {Spacing} from '../atoms/layout'; -import {Card} from '../atoms/card'; -import {Markdown} from '../atoms/markdown'; -import {Button} from '../atoms/button'; - -import {Scrollable} from '../templates/scrollable'; -import {text} from '../../theme'; -import {useSettings} from '../../providers/settings'; import PushNotification from 'react-native-push-notification'; -import {BubbleIcons} from '../../assets/icons'; + +import {BubbleIcons} from 'assets/icons'; +import {Button} from 'components/atoms/button'; +import {Card} from 'components/atoms/card'; +import {Markdown} from 'components/atoms/markdown'; +import {Scrollable} from 'components/templates/scrollable'; +import {Spacing} from 'components/atoms/layout'; +import {text} from 'theme'; +import {useApplication} from 'providers/context'; +import {useSettings} from 'providers/settings'; export const CloseContact: FC = ({route}) => { const {t} = useTranslation(); diff --git a/components/views/contact-tracing-information.tsx b/src/components/views/contact-tracing-information.tsx similarity index 88% rename from components/views/contact-tracing-information.tsx rename to src/components/views/contact-tracing-information.tsx index 9caba21b..d408008b 100644 --- a/components/views/contact-tracing-information.tsx +++ b/src/components/views/contact-tracing-information.tsx @@ -4,30 +4,27 @@ import {StackNavigationProp} from '@react-navigation/stack'; import {useTranslation} from 'react-i18next'; import * as SecureStore from 'expo-secure-store'; -import {usePermissions} from '../../providers/permissions'; -import {useExposure} from '../../providers/exposure'; +import {usePermissions} from 'providers/permissions'; +import {useExposure} from 'providers/exposure'; +import {SingleRow, Spacing} from 'components/atoms/layout'; +import {Button} from 'components/atoms/button'; +import {Link} from 'components/atoms/link'; +import {Quote} from 'components/molecules/quote'; +import {Card} from 'components/atoms/card'; +import {PinnedBottom} from 'components/templates/pinned'; +import {Scrollable} from 'components/templates/scrollable'; +import {colors, text} from 'theme'; +import {AppIcons} from 'assets/icons'; -import {SingleRow, Spacing} from '../atoms/layout'; -import {Button} from '../atoms/button'; -import {Link} from '../atoms/link'; -import {Quote} from '../molecules/quote'; -import {Card} from '../atoms/card'; - -import {colors} from '../../constants/colors'; -import {PinnedBottom} from '../templates/pinned'; -import {Scrollable} from '../templates/scrollable'; -import {text} from '../../theme'; -import {AppIcons} from '../../assets/icons'; - -const TracingImage = require('../../assets/images/information/image.png'); +const TracingImage = require('assets/images/information/image.png'); interface Props { navigation: StackNavigationProp; } const upgradeImage: {[key: string]: any} = { - ios: require('../../assets/images/apple/image.png'), - android: require('../../assets/images/google/image.png') + ios: require('assets/images/apple/image.png'), + android: require('assets/images/google/image.png') }; export const ContactTracingInformation = ({navigation, route}: Props) => { @@ -79,7 +76,7 @@ export const ContactTracingInformation = ({navigation, route}: Props) => { accessibilityIgnoresInvertColors style={notSupportedStyles.image} {...notSupportedStyles.image} - source={require('../../assets/images/phone/not-active.png')} + source={require('assets/images/phone/not-active.png')} /> diff --git a/components/views/contact-tracing/active.tsx b/src/components/views/contact-tracing/active.tsx similarity index 77% rename from components/views/contact-tracing/active.tsx rename to src/components/views/contact-tracing/active.tsx index 24236f24..099753b7 100644 --- a/components/views/contact-tracing/active.tsx +++ b/src/components/views/contact-tracing/active.tsx @@ -2,12 +2,10 @@ import React, {FC, useRef} from 'react'; import {StyleSheet, View, Text, Animated} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {Spacing} from '../../atoms/layout'; -import {Card} from '../../atoms/card'; -import {ResponsiveImage} from '../../atoms/responsive-image'; - -import {colors} from '../../../constants/colors'; -import {text} from '../../../theme'; +import {Card} from 'components/atoms/card'; +import {colors, text} from 'theme'; +import {ResponsiveImage} from 'components/atoms/responsive-image'; +import {Spacing} from 'components/atoms/layout'; export const Active: FC = () => { const {t} = useTranslation(); @@ -22,7 +20,7 @@ export const Active: FC = () => { @@ -30,7 +28,7 @@ export const Active: FC = () => { diff --git a/components/views/contact-tracing/can-support.tsx b/src/components/views/contact-tracing/can-support.tsx similarity index 69% rename from components/views/contact-tracing/can-support.tsx rename to src/components/views/contact-tracing/can-support.tsx index 0ee8ea95..c2ed0ea6 100644 --- a/components/views/contact-tracing/can-support.tsx +++ b/src/components/views/contact-tracing/can-support.tsx @@ -2,16 +2,14 @@ import React, {FC} from 'react'; import {Platform, Text, Linking} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {Spacing} from '../../atoms/layout'; -import {Card} from '../../atoms/card'; -import {ResponsiveImage} from '../../atoms/responsive-image'; -import {Toast} from '../../atoms/toast'; -import {Button} from '../../atoms/button'; - -import {colors} from '../../../constants/colors'; -import {text} from '../../../theme'; -import {useExposure} from '../../../providers/exposure'; -import {AppIcons} from '../../../assets/icons'; +import {AppIcons} from 'assets/icons'; +import {Button} from 'components/atoms/button'; +import {Card} from 'components/atoms/card'; +import {colors, text} from 'theme'; +import {ResponsiveImage} from 'components/atoms/responsive-image'; +import {Spacing} from 'components/atoms/layout'; +import {Toast} from 'components/atoms/toast'; +import {useExposure} from 'providers/exposure'; export const CanSupport: FC = () => { const {t} = useTranslation(); @@ -34,7 +32,7 @@ export const CanSupport: FC = () => { { const {t} = useTranslation(); diff --git a/components/views/contact-tracing/no-support.tsx b/src/components/views/contact-tracing/no-support.tsx similarity index 59% rename from components/views/contact-tracing/no-support.tsx rename to src/components/views/contact-tracing/no-support.tsx index 2042245a..4b6f8e98 100644 --- a/components/views/contact-tracing/no-support.tsx +++ b/src/components/views/contact-tracing/no-support.tsx @@ -3,14 +3,12 @@ import {Text} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {Spacing} from '../../atoms/layout'; -import {Card} from '../../atoms/card'; -import {ResponsiveImage} from '../../atoms/responsive-image'; -import {Toast} from '../../atoms/toast'; - -import {colors} from '../../../constants/colors'; -import {text} from '../../../theme'; -import {AppIcons} from '../../../assets/icons'; +import {AppIcons} from 'assets/icons'; +import {Card} from 'components/atoms/card'; +import {colors, text} from 'theme'; +import {ResponsiveImage} from 'components/atoms/responsive-image'; +import {Spacing} from 'components/atoms/layout'; +import {Toast} from 'components/atoms/toast'; export const NoSupport: FC = () => { const {t} = useTranslation(); @@ -19,7 +17,7 @@ export const NoSupport: FC = () => { = ({ { const {t} = useTranslation(); @@ -21,7 +19,7 @@ export const NotEnabled: FC = () => { { const {t} = useTranslation(); const app = useApplication(); diff --git a/components/views/dashboard.tsx b/src/components/views/dashboard.tsx similarity index 80% rename from components/views/dashboard.tsx rename to src/components/views/dashboard.tsx index ae1bdc53..bc01723f 100644 --- a/components/views/dashboard.tsx +++ b/src/components/views/dashboard.tsx @@ -3,28 +3,25 @@ import {View, StyleSheet} from 'react-native'; import {useFocusEffect, useIsFocused} from '@react-navigation/native'; import {useTranslation} from 'react-i18next'; -import {useApplication} from '../../providers/context'; -import {useExposure} from '../../providers/exposure'; -import {useAppState} from '../../hooks/app-state'; - -import {Spacing} from '../atoms/spacing'; -import {Card} from '../atoms/card'; - -import {CheckInCard} from '../molecules/check-in-card'; -import {QuickCheckIn} from '../molecules/quick-checkin'; -import {TrackerAreaChart} from '../molecules/area-chart'; -import {TransmissionChart} from '../molecules/transmission-chart'; -import {StatsSource} from '../molecules/stats-source'; -import {AppStats} from '../organisms/app-stats'; -import {CovidStats} from '../organisms/covid-stats'; - -import {Scrollable} from '../templates/scrollable'; -import {Button} from '../../components/atoms/button'; -import {Toast} from '../../components/atoms/toast'; -import {CloseContactWarning} from '../molecules/close-contact-warning'; -import {TracingAvailable} from '../molecules/tracing-available'; -import {usePermissions} from '../../providers/permissions'; -import {AppIcons} from '../../assets/icons'; +import {AppIcons} from 'assets/icons'; +import {AppStats} from 'components/organisms/app-stats'; +import {Button} from 'components/atoms/button'; +import {Card} from 'components/atoms/card'; +import {CheckInCard} from 'components/molecules/check-in-card'; +import {CloseContactWarning} from 'components/molecules/close-contact-warning'; +import {CovidStats} from 'components/organisms/covid-stats'; +import {QuickCheckIn} from 'components/molecules/quick-checkin'; +import {Scrollable} from 'components/templates/scrollable'; +import {Spacing} from 'components/atoms/spacing'; +import {StatsSource} from 'components/molecules/stats-source'; +import {Toast} from 'components/atoms/toast'; +import {TracingAvailable} from 'components/molecules/tracing-available'; +import {TrackerAreaChart} from 'components/molecules/area-chart'; +import {TransmissionChart} from 'components/molecules/transmission-chart'; +import {useApplication} from 'providers/context'; +import {useAppState} from 'hooks/app-state'; +import {useExposure} from 'providers/exposure'; +import {usePermissions} from 'providers/permissions'; export const Dashboard: FC = ({navigation}) => { const app = useApplication(); diff --git a/components/views/data-protection-policy.tsx b/src/components/views/data-protection-policy.tsx similarity index 82% rename from components/views/data-protection-policy.tsx rename to src/components/views/data-protection-policy.tsx index 7570bce9..914220f0 100644 --- a/components/views/data-protection-policy.tsx +++ b/src/components/views/data-protection-policy.tsx @@ -1,15 +1,14 @@ import React from 'react'; import {StyleSheet} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {useSettings} from '../../providers/settings'; -import {Markdown} from '../atoms/markdown'; -import {Link} from '../atoms/link'; import {useNavigation} from '@react-navigation/native'; -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; -import {Scrollable} from '../templates/scrollable'; -import Icons from '../../assets/icons'; +import Icons from 'assets/icons'; +import {colors, text} from 'theme'; +import {Link} from 'components/atoms/link'; +import {Markdown} from 'components/atoms/markdown'; +import {Scrollable} from 'components/templates/scrollable'; +import {useSettings} from 'providers/settings'; const styles = StyleSheet.create({ privacy: { diff --git a/components/views/follow-up-call.tsx b/src/components/views/follow-up-call.tsx similarity index 78% rename from components/views/follow-up-call.tsx rename to src/components/views/follow-up-call.tsx index 69e7e4f2..2d7c5f06 100644 --- a/components/views/follow-up-call.tsx +++ b/src/components/views/follow-up-call.tsx @@ -4,18 +4,17 @@ import {useTranslation} from 'react-i18next'; import {styles as OStyles} from './get-started'; -import {Spacing, Separator} from '../atoms/layout'; -import {Heading} from '../atoms/heading'; -import {Link} from '../atoms/link'; -import {Markdown} from '../atoms/markdown'; -import {PhoneNumber} from '../organisms/phone-number'; +import {Spacing, Separator} from 'components/atoms/layout'; +import {Heading} from 'components/atoms/heading'; +import {Link} from 'components/atoms/link'; +import {Markdown} from 'components/atoms/markdown'; +import {PhoneNumber} from 'components/organisms/phone-number'; +import {text} from 'theme'; +import {saveMetric, METRIC_TYPES} from 'services/api'; +import {useExposure} from 'providers/exposure'; +import {KeyboardScrollable} from 'components/templates/keyboard-scrollable'; -import {text} from '../../theme'; -import {KeyboardScrollable} from '../templates/keyboard-scrollable'; -import {saveMetric, METRIC_TYPES} from '../../services/api'; -import {useExposure} from '../../providers/exposure'; - -const CallbackImage = require('../../assets/images/callback/image.png'); +const CallbackImage = require('assets/images/callback/image.png'); interface FollowUpCallProps { navigation: any; diff --git a/components/views/get-started.tsx b/src/components/views/get-started.tsx similarity index 93% rename from components/views/get-started.tsx rename to src/components/views/get-started.tsx index 39cfc81d..8331a260 100644 --- a/components/views/get-started.tsx +++ b/src/components/views/get-started.tsx @@ -14,19 +14,16 @@ import { import {StackNavigationProp} from '@react-navigation/stack'; import {useTranslation} from 'react-i18next'; -import {Spacing} from '../atoms/spacing'; -import {Button} from '../atoms/button'; +import {Button} from 'components/atoms/button'; +import {colors, text} from 'theme'; +import {NavBar} from 'components/atoms/navbar'; +import {Spacing} from 'components/atoms/spacing'; +import {useApplication} from 'providers/context'; +import {Basic} from 'components/templates/basic'; -import {colors} from '../../constants/colors'; -import {Basic} from '../templates/basic'; -import {text} from '../../theme'; - -const OnboardingImage = require('../../assets/images/onboarding-bg/bg.png'); -const Logo = require('../../assets/images/logo/logo.png'); -const OnboardImage = require('../../assets/images/onboard4/image.png'); - -import {NavBar} from '../atoms/navbar'; -import {useApplication} from '../../providers/context'; +const OnboardingImage = require('assets/images/onboarding-bg/bg.png'); +const Logo = require('assets/images/logo/logo.png'); +const OnboardImage = require('assets/images/onboard4/image.png'); interface GetStartedProps { navigation: StackNavigationProp; diff --git a/components/views/loading.tsx b/src/components/views/loading.tsx similarity index 91% rename from components/views/loading.tsx rename to src/components/views/loading.tsx index 35c778fd..9edc0e49 100644 --- a/components/views/loading.tsx +++ b/src/components/views/loading.tsx @@ -1,10 +1,11 @@ import React, {FC} from 'react'; import {StyleSheet, Dimensions, Image, View} from 'react-native'; import Spinner from 'react-native-loading-spinner-overlay'; -import {Spacing} from '../atoms/spacing'; import {useTranslation} from 'react-i18next'; import {useSafeArea} from 'react-native-safe-area-context'; -import {colors} from '../../constants/colors'; + +import {Spacing} from 'components/atoms/spacing'; +import {colors} from 'theme'; const width = Dimensions.get('window').width; const SPLASH_WIDTH = 375; @@ -22,7 +23,7 @@ export const Loading: FC = () => { width={width} height={(width * SPLASH_HEIGHT) / SPLASH_WIDTH} resizeMode="contain" - source={require('../../assets/age-bg.png')} + source={require('assets/age-bg.png')} accessible accessibilityRole="text" accessibilityHint={t('common:name')} diff --git a/components/views/over-16.tsx b/src/components/views/over-16.tsx similarity index 89% rename from components/views/over-16.tsx rename to src/components/views/over-16.tsx index 445d795f..b0b3aaab 100644 --- a/components/views/over-16.tsx +++ b/src/components/views/over-16.tsx @@ -2,15 +2,13 @@ import React, {FC} from 'react'; import {StyleSheet, View, Text, Dimensions, Image} from 'react-native'; import {useSafeArea} from 'react-native-safe-area-context'; import {useTranslation} from 'react-i18next'; - -import {Spacing} from '../atoms/spacing'; -import {Button} from '../atoms/button'; -import {Link} from '../atoms/link'; - -import {colors} from '../../constants/colors'; -import {text} from '../../theme'; import {ScrollView} from 'react-native-gesture-handler'; +import {Button} from 'components/atoms/button'; +import {colors, text} from 'theme'; +import {Link} from 'components/atoms/link'; +import {Spacing} from 'components/atoms/spacing'; + const width = Dimensions.get('window').width; const SPLASH_WIDTH = 375; const SPLASH_HEIGHT = 291; @@ -29,7 +27,7 @@ export const Over16: FC = ({navigation}) => { width={width} height={(width * SPLASH_HEIGHT) / SPLASH_WIDTH} resizeMode="contain" - source={require('../../assets/age-bg.png')} + source={require('assets/age-bg.png')} accessible accessibilityRole="text" accessibilityHint={t('common:name')} diff --git a/components/views/settings/check-in.tsx b/src/components/views/settings/check-in.tsx similarity index 83% rename from components/views/settings/check-in.tsx rename to src/components/views/settings/check-in.tsx index 2c2eb44d..53de2a5d 100644 --- a/components/views/settings/check-in.tsx +++ b/src/components/views/settings/check-in.tsx @@ -2,22 +2,18 @@ import React, {useState, useRef} from 'react'; import {Text, ScrollView} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {Spacing, Separator} from '../../atoms/layout'; -import {Button} from '../../atoms/button'; -import {SelectList} from '../../atoms/select-list'; -import {Dropdown} from '../../atoms/dropdown'; -import {Toast} from '../../atoms/toast'; -import {LocationDropdown} from '../../molecules/locality-dropdown'; - -import {useSettings} from '../../../providers/settings'; -import {useApplication, UserLocation} from '../../../providers/context'; - -import {text, baseStyles} from '../../../theme'; - -import {Basic} from '../../templates/basic'; -import {Scrollable} from '../../templates/scrollable'; -import {AppIcons} from '../../../assets/icons'; -import {colors} from '../../../constants/colors'; +import {AppIcons} from 'assets/icons'; +import {Basic} from 'components/templates/basic'; +import {Button} from 'components/atoms/button'; +import {colors, text, baseStyles} from 'theme'; +import {Dropdown} from 'components/atoms/dropdown'; +import {LocationDropdown} from 'components/molecules/locality-dropdown'; +import {Scrollable} from 'components/templates/scrollable'; +import {SelectList} from 'components/atoms/select-list'; +import {Spacing, Separator} from 'components/atoms/layout'; +import {Toast} from 'components/atoms/toast'; +import {useApplication, UserLocation} from 'providers/context'; +import {useSettings} from 'providers/settings'; interface ProfileData { sex: string; diff --git a/components/views/settings/contact-tracing.tsx b/src/components/views/settings/contact-tracing.tsx similarity index 87% rename from components/views/settings/contact-tracing.tsx rename to src/components/views/settings/contact-tracing.tsx index d8c7822e..518da362 100644 --- a/components/views/settings/contact-tracing.tsx +++ b/src/components/views/settings/contact-tracing.tsx @@ -4,21 +4,18 @@ import * as IntentLauncher from 'expo-intent-launcher'; import {useTranslation} from 'react-i18next'; import {useFocusEffect, useIsFocused} from '@react-navigation/native'; -import {useExposure, StatusState} from '../../../providers/exposure'; -import {usePermissions} from '../../../providers/permissions'; -import {useAppState} from '../../../hooks/app-state'; - -import {Spacing, Separator} from '../../atoms/layout'; -import {Button} from '../../atoms/button'; -import {Markdown} from '../../atoms/markdown'; -import {PhoneNumber} from '../..//organisms/phone-number'; -import {Toast} from '../../atoms/toast'; - -import {KeyboardScrollable} from '../../templates/keyboard-scrollable'; -import {text} from '../../../theme'; -import {METRIC_TYPES, saveMetric} from '../../../services/api'; -import {colors} from '../../../constants/colors'; -import {AppIcons} from '../../../assets/icons'; +import {AppIcons} from 'assets/icons'; +import {Button} from 'components/atoms/button'; +import {colors, text} from 'theme'; +import {KeyboardScrollable} from 'components/templates/keyboard-scrollable'; +import {Markdown} from 'components/atoms/markdown'; +import {METRIC_TYPES, saveMetric} from 'services/api'; +import {PhoneNumber} from 'components/organisms/phone-number'; +import {Spacing, Separator} from 'components/atoms/layout'; +import {Toast} from 'components/atoms/toast'; +import {useAppState} from 'hooks/app-state'; +import {useExposure, StatusState} from 'providers/exposure'; +import {usePermissions} from 'providers/permissions'; export const ContactTracingSettings = () => { const {t} = useTranslation(); diff --git a/components/views/settings/debug.tsx b/src/components/views/settings/debug.tsx similarity index 97% rename from components/views/settings/debug.tsx rename to src/components/views/settings/debug.tsx index bf32265d..db93b451 100644 --- a/components/views/settings/debug.tsx +++ b/src/components/views/settings/debug.tsx @@ -10,10 +10,9 @@ import { import ExposureNotification from 'react-native-exposure-notification-service'; import {format} from 'date-fns'; -import {Button} from '../../atoms/button'; -import {useExposure} from '../../../providers/exposure'; - -import {Basic} from '../../templates/basic'; +import {Button} from 'components/atoms/button'; +import {useExposure} from 'providers/exposure'; +import {Basic} from 'components/templates/basic'; const emitter = new NativeEventEmitter(ExposureNotification); diff --git a/components/views/settings/index.tsx b/src/components/views/settings/index.tsx similarity index 96% rename from components/views/settings/index.tsx rename to src/components/views/settings/index.tsx index 1e13c3c4..588fa307 100644 --- a/components/views/settings/index.tsx +++ b/src/components/views/settings/index.tsx @@ -14,12 +14,9 @@ import {StackNavigationProp} from '@react-navigation/stack'; import {useTranslation} from 'react-i18next'; import {BUILD_VERSION, HIDE_DEBUG} from 'react-native-dotenv'; -import {colors} from '../../../constants/colors'; -import {text, shadows} from '../../../theme'; - -import {Basic} from '../../templates/basic'; -import {AppIcons} from '../../../assets/icons'; - +import {AppIcons} from 'assets/icons'; +import {Basic} from 'components/templates/basic'; +import {colors, text, shadows} from 'theme'; const REQUIRED_PRESS_COUNT = 3; diff --git a/components/views/settings/leave.tsx b/src/components/views/settings/leave.tsx similarity index 83% rename from components/views/settings/leave.tsx rename to src/components/views/settings/leave.tsx index 430f31a4..cdc8ca23 100644 --- a/components/views/settings/leave.tsx +++ b/src/components/views/settings/leave.tsx @@ -2,19 +2,17 @@ import React from 'react'; import {Alert, StyleSheet, View} from 'react-native'; import {useTranslation} from 'react-i18next'; import * as Haptics from 'expo-haptics'; - -import {Button} from '../../atoms/button'; -import {Markdown} from '../../atoms/markdown'; - -import {useApplication} from '../../../providers/context'; -import {useExposure} from '../../../providers/exposure'; -import {forget} from '../../../services/api'; - -import {Basic} from '../../templates/basic'; -import {DataProtectionLink} from '../data-protection-policy'; -import {Spacing} from '../../atoms/spacing'; import {ScrollView} from 'react-native-gesture-handler'; +import {Button} from 'components/atoms/button'; +import {DataProtectionLink} from 'components/views/data-protection-policy'; +import {forget} from 'services/api'; +import {Markdown} from 'components/atoms/markdown'; +import {Spacing} from 'components/atoms/spacing'; +import {useApplication} from 'providers/context'; +import {useExposure} from 'providers/exposure'; +import {Basic} from 'components/templates/basic'; + export const Leave = ({navigation}) => { const {t} = useTranslation(); const app = useApplication(); diff --git a/components/views/settings/metrics.tsx b/src/components/views/settings/metrics.tsx similarity index 82% rename from components/views/settings/metrics.tsx rename to src/components/views/settings/metrics.tsx index 3fcb9867..c4791aa0 100644 --- a/components/views/settings/metrics.tsx +++ b/src/components/views/settings/metrics.tsx @@ -3,14 +3,12 @@ import {useTranslation} from 'react-i18next'; import {Text, Switch, View, StyleSheet} from 'react-native'; import * as SecureStore from 'expo-secure-store'; -import {Markdown} from '../../atoms/markdown'; - -import {Scrollable} from '../../templates/scrollable'; -import {Spacing} from '../../atoms/spacing'; -import {DataProtectionLink} from '../data-protection-policy'; -import {text} from '../../../theme'; -import {colors} from '../../../constants/colors'; -import {useExposure} from '../../../providers/exposure'; +import {colors, text} from 'theme'; +import {DataProtectionLink} from 'components/views/data-protection-policy'; +import {Markdown} from 'components/atoms/markdown'; +import {Spacing} from 'components/atoms/spacing'; +import {useExposure} from 'providers/exposure'; +import {Scrollable} from 'components/templates/scrollable'; export const Metrics = () => { const {t} = useTranslation(); diff --git a/components/views/sorry.tsx b/src/components/views/sorry.tsx similarity index 61% rename from components/views/sorry.tsx rename to src/components/views/sorry.tsx index 33a71e43..db66c658 100644 --- a/components/views/sorry.tsx +++ b/src/components/views/sorry.tsx @@ -2,12 +2,11 @@ import React, {FC} from 'react'; import {Text} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {Spacing} from '../atoms/spacing'; -import {Button} from '../atoms/button'; -import {ResponsiveImage} from '../atoms/responsive-image'; - -import {text} from '../../theme'; -import {PinnedBottom} from '../templates/pinned'; +import {Button} from 'components/atoms/button'; +import {ResponsiveImage} from 'components/atoms/responsive-image'; +import {Spacing} from 'components/atoms/spacing'; +import {text} from 'theme'; +import {PinnedBottom} from 'components/templates/pinned'; export const Sorry: FC = ({navigation}) => { const {t} = useTranslation(); @@ -16,7 +15,7 @@ export const Sorry: FC = ({navigation}) => { {t('sorry:info')} diff --git a/components/views/symptom-checker.tsx b/src/components/views/symptom-checker.tsx similarity index 90% rename from components/views/symptom-checker.tsx rename to src/components/views/symptom-checker.tsx index b2122d5e..accdf7b9 100644 --- a/components/views/symptom-checker.tsx +++ b/src/components/views/symptom-checker.tsx @@ -11,31 +11,28 @@ import {useTranslation} from 'react-i18next'; import {RouteProp} from '@react-navigation/native'; import {useFocusEffect} from '@react-navigation/native'; -import {useApplication, Symptoms} from '../../providers/context'; -import {useSettings} from '../../providers/settings'; - -import {Spacing, Separator} from '../atoms/layout'; -import {Heading} from '../atoms/heading'; -import {Button} from '../atoms/button'; -import {Markdown} from '../atoms/markdown'; -import {Dropdown} from '../atoms/dropdown'; -import {SelectList} from '../atoms/select-list'; -import {CheckInConsent} from '../molecules/checkin-consent'; -import {LocationDropdown} from '../molecules/locality-dropdown'; -import {Result} from '../molecules/result-card'; - -import {colors} from '../../constants/colors'; -import {Scrollable} from '../templates/scrollable'; -import {text, shadows, baseStyles} from '../../theme'; +import {Button} from 'components/atoms/button'; +import {CheckInConsent} from 'components/molecules/checkin-consent'; +import {colors, text, shadows, baseStyles} from 'theme'; +import {Dropdown} from 'components/atoms/dropdown'; +import {Heading} from 'components/atoms/heading'; +import {LocationDropdown} from 'components/molecules/locality-dropdown'; +import {Markdown} from 'components/atoms/markdown'; +import {Result} from 'components/molecules/result-card'; +import {SelectList} from 'components/atoms/select-list'; +import {Spacing, Separator} from 'components/atoms/layout'; +import {useApplication, Symptoms} from 'providers/context'; +import {useSettings} from 'providers/settings'; +import {Scrollable} from 'components/templates/scrollable'; const width = Dimensions.get('window').width; const ANIMATION_DURATION = 300; const icons = { - '1': require('../../assets/images/symptoma/image.png'), - '2': require('../../assets/images/symptomc/image.png'), - '3': require('../../assets/images/symptomb/image.png'), - '4': require('../../assets/images/symptomd/image.png') + '1': require('assets/images/symptoma/image.png'), + '2': require('assets/images/symptomc/image.png'), + '3': require('assets/images/symptomb/image.png'), + '4': require('assets/images/symptomd/image.png') }; function countSymptoms(symptoms: Symptoms) { diff --git a/components/views/symptoms-history.tsx b/src/components/views/symptoms-history.tsx similarity index 85% rename from components/views/symptoms-history.tsx rename to src/components/views/symptoms-history.tsx index 3153f7cc..4fb05e85 100644 --- a/components/views/symptoms-history.tsx +++ b/src/components/views/symptoms-history.tsx @@ -4,26 +4,23 @@ import {useFocusEffect, useIsFocused} from '@react-navigation/native'; import {useTranslation} from 'react-i18next'; import {format} from 'date-fns'; -import {useApplication} from '../../providers/context'; -import {useAppState} from '../../hooks/app-state'; - -import {Spacing} from '../atoms/layout'; -import {Card} from '../atoms/card'; -import {Heading} from '../atoms/heading'; -import {Toast} from '../atoms/toast'; -import {CheckInCard} from '../molecules/check-in-card'; - -import {colors} from '../../constants/colors'; -import {Scrollable} from '../templates/scrollable'; -import {text} from '../../theme'; -import {usePermissions} from '../../providers/permissions'; -import {BubbleIcons, AppIcons} from '../../assets/icons'; +import {useApplication} from 'providers/context'; +import {useAppState} from 'hooks/app-state'; +import {Spacing} from 'components/atoms/layout'; +import {Card} from 'components/atoms/card'; +import {Heading} from 'components/atoms/heading'; +import {Toast} from 'components/atoms/toast'; +import {CheckInCard} from 'components/molecules/check-in-card'; +import {Scrollable} from 'components/templates/scrollable'; +import {colors, text} from 'theme'; +import {usePermissions} from 'providers/permissions'; +import {BubbleIcons} from 'assets/icons'; const symptomsHistoryIcons = { - '1': require('../../assets/images/symptoms-history/1_temp.png'), - '2': require('../../assets/images/symptoms-history/2_cough.png'), - '3': require('../../assets/images/symptoms-history/3_shortness.png'), - '4': require('../../assets/images/symptoms-history/4_nose.png') + '1': require('assets/images/symptoms-history/1_temp.png'), + '2': require('assets/images/symptoms-history/2_cough.png'), + '3': require('assets/images/symptoms-history/3_shortness.png'), + '4': require('assets/images/symptoms-history/4_nose.png') }; export const SymptomsHistory = ({navigation}) => { diff --git a/components/views/under-16.tsx b/src/components/views/under-16.tsx similarity index 60% rename from components/views/under-16.tsx rename to src/components/views/under-16.tsx index d67caa13..921ee4e6 100644 --- a/components/views/under-16.tsx +++ b/src/components/views/under-16.tsx @@ -2,11 +2,10 @@ import React, {FC} from 'react'; import {Text} from 'react-native'; import {useTranslation} from 'react-i18next'; -import {Spacing} from '../atoms/spacing'; -import {ResponsiveImage} from '../atoms/responsive-image'; - -import {text} from '../../theme'; -import {Basic} from '../templates/basic'; +import {ResponsiveImage} from 'components/atoms/responsive-image'; +import {Spacing} from 'components/atoms/spacing'; +import {text} from 'theme'; +import {Basic} from 'components/templates/basic'; export const Under16: FC = () => { const {t} = useTranslation(); @@ -15,7 +14,7 @@ export const Under16: FC = () => { {t('underAge:notice')} diff --git a/components/views/upload-keys.tsx b/src/components/views/upload-keys.tsx similarity index 90% rename from components/views/upload-keys.tsx rename to src/components/views/upload-keys.tsx index 19f8e83f..8efac84e 100644 --- a/components/views/upload-keys.tsx +++ b/src/components/views/upload-keys.tsx @@ -3,28 +3,24 @@ import {Text, StyleSheet} from 'react-native'; import * as SecureStore from 'expo-secure-store'; import {useTranslation} from 'react-i18next'; -import {useApplication} from '../../providers/context'; -import {useExposure} from '../../providers/exposure'; +import {DataProtectionLink} from './data-protection-policy'; +import {useApplication} from 'providers/context'; +import {useExposure} from 'providers/exposure'; import { validateCode, uploadExposureKeys, ValidationResult -} from '../../services/api/exposures'; - -import {DataProtectionLink} from './data-protection-policy'; - -import {Spacing} from '../atoms/layout'; -import {Markdown} from '../atoms/markdown'; -import {Button} from '../atoms/button'; -import {Card} from '../atoms/card'; -import {Toast} from '../atoms/toast'; -import {CodeInput} from '../molecules/code-input'; - -import {colors} from '../../constants/colors'; -import {KeyboardScrollable} from '../templates/keyboard-scrollable'; -import {text, baseStyles} from '../../theme'; -import {AppIcons} from '../../assets/icons'; +} from 'services/api/exposures'; +import {AppIcons} from 'assets/icons'; +import {Button} from 'components/atoms/button'; +import {Card} from 'components/atoms/card'; +import {CodeInput} from 'components/molecules/code-input'; +import {colors, text, baseStyles} from 'theme'; +import {KeyboardScrollable} from 'components/templates/keyboard-scrollable'; +import {Markdown} from 'components/atoms/markdown'; +import {Spacing} from 'components/atoms/layout'; +import {Toast} from 'components/atoms/toast'; type UploadStatus = | 'initialising' diff --git a/components/views/your-data.tsx b/src/components/views/your-data.tsx similarity index 81% rename from components/views/your-data.tsx rename to src/components/views/your-data.tsx index 9c2c3789..bc21a7bd 100644 --- a/components/views/your-data.tsx +++ b/src/components/views/your-data.tsx @@ -3,20 +3,17 @@ import {StackNavigationProp} from '@react-navigation/stack'; import * as SecureStore from 'expo-secure-store'; import {useTranslation} from 'react-i18next'; -import {useApplication} from '../../providers/context'; -import {register} from '../../services/api'; - import {DataProtectionLink} from './data-protection-policy'; -import {Spacing} from '../atoms/layout'; -import {Markdown} from '../atoms/markdown'; -import {Button} from '../atoms/button'; -import {Quote} from '../molecules/quote'; -import {Toast} from '../atoms/toast'; - - -import {Scrollable} from '../templates/scrollable'; -import {AppIcons} from '../../assets/icons'; +import {useApplication} from 'providers/context'; +import {register} from 'services/api'; +import {Spacing} from 'components/atoms/layout'; +import {Markdown} from 'components/atoms/markdown'; +import {Button} from 'components/atoms/button'; +import {Quote} from 'components/molecules/quote'; +import {Toast} from 'components/atoms/toast'; +import {Scrollable} from 'components/templates/scrollable'; +import {AppIcons} from 'assets/icons'; interface YourDataProps { navigation: StackNavigationProp; diff --git a/constants/colors.ts b/src/constants/colors.ts similarity index 100% rename from constants/colors.ts rename to src/constants/colors.ts diff --git a/components/templates/shared.ts b/src/constants/shared.ts similarity index 100% rename from components/templates/shared.ts rename to src/constants/shared.ts diff --git a/constants/urls.ts b/src/constants/urls.ts similarity index 100% rename from constants/urls.ts rename to src/constants/urls.ts diff --git a/hooks/app-state.tsx b/src/hooks/app-state.tsx similarity index 100% rename from hooks/app-state.tsx rename to src/hooks/app-state.tsx diff --git a/navigation.tsx b/src/navigation.tsx similarity index 100% rename from navigation.tsx rename to src/navigation.tsx diff --git a/providers/context.tsx b/src/providers/context.tsx similarity index 99% rename from providers/context.tsx rename to src/providers/context.tsx index 301d06cf..c662264c 100644 --- a/providers/context.tsx +++ b/src/providers/context.tsx @@ -11,8 +11,8 @@ import * as SecureStore from 'expo-secure-store'; import {format, compareDesc, startOfDay, subDays, isBefore} from 'date-fns'; import {AppConfig} from './settings'; -import {loadData, StatsData} from '../services/api'; -import * as api from '../services/api/'; +import {loadData, StatsData} from 'services/api'; +import * as api from 'services/api'; export interface UserLocation { county?: string; diff --git a/providers/exposure.tsx b/src/providers/exposure.tsx similarity index 99% rename from providers/exposure.tsx rename to src/providers/exposure.tsx index 65e6f444..0480cd76 100644 --- a/providers/exposure.tsx +++ b/src/providers/exposure.tsx @@ -2,12 +2,14 @@ import React, {useEffect, useState, createContext, useContext} from 'react'; import {NativeEventEmitter, Alert, Platform} from 'react-native'; import ExposureNotification from 'react-native-exposure-notification-service'; import * as SecureStore from 'expo-secure-store'; +import {useTranslation} from 'react-i18next'; +import {BUILD_VERSION, HIDE_DEBUG} from 'react-native-dotenv'; + import {useApplication} from './context'; import {usePermissions, PermissionStatus} from './permissions'; -import {urls} from '../constants/urls'; import {useSettings} from './settings'; -import {useTranslation} from 'react-i18next'; -import {BUILD_VERSION, HIDE_DEBUG} from 'react-native-dotenv'; + +import {urls} from 'constants/urls'; const emitter = new NativeEventEmitter(ExposureNotification); diff --git a/providers/permissions/index.tsx b/src/providers/permissions/index.tsx similarity index 100% rename from providers/permissions/index.tsx rename to src/providers/permissions/index.tsx diff --git a/providers/permissions/internals/index.android.ts b/src/providers/permissions/internals/index.android.ts similarity index 100% rename from providers/permissions/internals/index.android.ts rename to src/providers/permissions/internals/index.android.ts diff --git a/providers/permissions/internals/index.ios.ts b/src/providers/permissions/internals/index.ios.ts similarity index 100% rename from providers/permissions/internals/index.ios.ts rename to src/providers/permissions/internals/index.ios.ts diff --git a/providers/permissions/types.ts b/src/providers/permissions/types.ts similarity index 100% rename from providers/permissions/types.ts rename to src/providers/permissions/types.ts diff --git a/providers/settings.tsx b/src/providers/settings.tsx similarity index 98% rename from providers/settings.tsx rename to src/providers/settings.tsx index b4d51597..cd1fdbaf 100644 --- a/providers/settings.tsx +++ b/src/providers/settings.tsx @@ -9,10 +9,10 @@ import React, { import AsyncStorage from '@react-native-community/async-storage'; import i18n, {TFunction} from 'i18next'; import {useTranslation} from 'react-i18next'; - -import * as api from '../services/api'; import {isObject} from 'formik'; -import {fallback} from '../services/i18n/common'; + +import * as api from 'services/api'; +import {fallback} from 'services/i18n/common'; export interface BasicItem { label: string; diff --git a/services/api/exposures.ts b/src/services/api/exposures.ts similarity index 98% rename from services/api/exposures.ts rename to src/services/api/exposures.ts index 080acbb4..665f1e50 100644 --- a/services/api/exposures.ts +++ b/src/services/api/exposures.ts @@ -6,7 +6,7 @@ import { import {request, verify} from '.'; -import {urls} from '../../constants/urls'; +import {urls} from 'constants/urls'; export enum ValidationResult { NetworkError, diff --git a/services/api/index.ts b/src/services/api/index.ts similarity index 98% rename from services/api/index.ts rename to src/services/api/index.ts index 3324f176..436b4f79 100644 --- a/services/api/index.ts +++ b/src/services/api/index.ts @@ -9,10 +9,9 @@ import {BUILD_VERSION, ENV, TEST_TOKEN} from 'react-native-dotenv'; import RNGoogleSafetyNet from 'react-native-google-safetynet'; import RNIOS11DeviceCheck from 'react-native-ios11-devicecheck'; -import {urls} from '../../constants/urls'; -import {Check, UserLocation} from '../../providers/context'; - -import {isMountedRef, navigationRef} from '../../navigation'; +import {urls} from 'constants/urls'; +import {Check, UserLocation} from 'providers/context'; +import {isMountedRef, navigationRef} from 'navigation'; interface CheckIn { sex: string; diff --git a/services/i18n/common.tsx b/src/services/i18n/common.tsx similarity index 72% rename from services/i18n/common.tsx rename to src/services/i18n/common.tsx index 093d6e33..aacbec2b 100644 --- a/services/i18n/common.tsx +++ b/src/services/i18n/common.tsx @@ -1,5 +1,5 @@ -import en from '../../assets/lang/en.json'; -import ga from '../../assets/lang/ga.json'; +import en from 'assets/lang/en.json'; +import ga from 'assets/lang/ga.json'; export const fallback = 'en'; export const defaultNamespace = 'common'; diff --git a/services/i18n/index.ts b/src/services/i18n/index.ts similarity index 100% rename from services/i18n/index.ts rename to src/services/i18n/index.ts diff --git a/theme/base-styles.ts b/src/theme/base-styles.ts similarity index 92% rename from theme/base-styles.ts rename to src/theme/base-styles.ts index e5e8be1b..64bb558f 100644 --- a/theme/base-styles.ts +++ b/src/theme/base-styles.ts @@ -1,6 +1,6 @@ import {TextStyle} from 'react-native'; -import {colors} from '../constants/colors'; +import {colors} from './'; export const getBaseStyles = (text: any) => ({ label: { diff --git a/theme/index.ts b/src/theme/index.ts similarity index 82% rename from theme/index.ts rename to src/theme/index.ts index bcb5e907..26d4a195 100644 --- a/theme/index.ts +++ b/src/theme/index.ts @@ -4,6 +4,8 @@ import shadows from './shadows'; import getTextStyles from './text'; import {getBaseStyles, getInputStyle} from './base-styles'; +import {colors} from 'constants/colors'; + const SCREEN_HEIGHT = Dimensions.get('window').height; const REF_HEIGHT = 667; @@ -17,4 +19,4 @@ function scale(value: number): number { return Math.min(Math.round(ratio * SCREEN_HEIGHT), value); } -export {scale, baseStyles, inputStyle, text, shadows}; +export {scale, baseStyles, inputStyle, text, shadows, colors}; diff --git a/theme/shadows.ts b/src/theme/shadows.ts similarity index 100% rename from theme/shadows.ts rename to src/theme/shadows.ts diff --git a/theme/text.ts b/src/theme/text.ts similarity index 97% rename from theme/text.ts rename to src/theme/text.ts index 7c18f6ec..bf56f9ad 100644 --- a/theme/text.ts +++ b/src/theme/text.ts @@ -1,4 +1,4 @@ -import {colors} from '../constants/colors'; +import {colors} from 'constants/colors'; export default (scale: (v: number) => number) => ({ // lato-regular diff --git a/tsconfig.json b/tsconfig.json index dca84249..47b6ea8f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -37,13 +37,24 @@ /* Module Resolution Options */ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + "baseUrl": "src", /* Base directory to resolve non-absolute module names. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + "resolveJsonModule": true, + "paths": { + "src/*": ["./*"], + "assets/*": ["assets/*"], + "components/*": ["components/*"], + "constants/*": ["constants/*"], + "hooks/*": ["hooks/*"], + "navigation": ["navigation"], + "providers/*": ["providers/*"], + "services/*": ["services/*"], + "theme/*": ["theme/*"] + } // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ /* Source Map Options */ @@ -57,6 +68,6 @@ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ }, "exclude": [ - "node_modules", "babel.config.js", "metro.config.js", "jest.config.js" + "node_modules", "babel.config.js", "metro.config.js", "jest.config.js", "**/_*/**" ] }