Preview link: https://nbp-calc.netlify.app
This React application allows users to convert foreign currencies to Polish Zloty (PLN) and vice versa using exchange rates from the National Bank of Poland (NBP). The application includes features such as selecting past dates to retrieve historical exchange rates, and real-time conversion without needing to press a button. It also handles weekends and holidays by displaying appropriate messages when data is unavailable.
- Real-Time Conversion: Automatically updates conversion results as you type.
- Historical Rates: Allows users to select past dates to see historical exchange rates.
- Weekend and Holiday Handling: Displays messages when data is unavailable due to weekends or holidays.
- Responsive Design: Optimized for use on both desktop and mobile devices.
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
- Node.js
- npm (Node Package Manager)
-
Clone the repository:
git clone https://github.com/Bartek404/NBPHistoryRates-React cd currency-converter
-
Install the dependencies:
npm install
-
Start the development server:
npm start
The application should now be running at http://localhost:3000
.
- Select Currency: Choose the foreign currency you want to convert to or from PLN.
- Enter Amount: Enter the amount you want to convert.
- Select Date: Choose the date for which you want to see the exchange rate.
- View Conversion: The converted amount will be displayed automatically as you type.
App.js
: Main component containing the overall structure and state management.CurrencyConverter.js
: Component handling the conversion logic and UI.DatePicker.js
: Component for selecting dates.Calendar.js
: Handles calendar functionality.checkWeekend.js
: Utility function to check if a date is a weekend or holiday.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to the National Bank of Poland for providing the exchange rate API.