I have used React Native framework in JavaScript for this challenge.
-
When the API call is successful with no errors, I am showing the Products page
-
In case of an error, I have created an error page.
-
Incase of no internet connection, I am displaying a toast as well as a No internet connection page.
Clone the repository using the command below
$ git clone https://github.com/fadiaIW/wave-mobile-challenge.gitInstall the dependencies and devDependencies and start the server.
cd wave-mobile-challenge
npm iFor iOS
cd ios && pod install
npx react-native run-iosFor Android
npx react-native run-androidI created the currencyDisplay function in the helper file, which uses Intl.NumberFormat, to convert the price in CAD format, but is scalable to other currencies if required in the future.