{"size": 852, "ext": "js", "max_stars_repo_path": "src/App.js", "max_stars_repo_name": "agapas/react-currency-converter", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/App.js", "max_issues_repo_name": "agapas/react-currency-converter", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/App.js", "max_forks_repo_name": "agapas/react-currency-converter", "max_forks_repo_forks_event_min_datetime": "2020-11-30T22:11:35.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-27T03:18:57.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 25.0588235294, "max_line_length": 102, "alphanum_fraction": 0.6654929577}
import React from "react";
import "App.css";
import { DataController } from "components/DataController";

// export const API_URL = "https://api.exchangeratesapi.io/latest";
/*
  "https://api.exchangeratesapi.io/latest" doesn't work since 1st April 2021
  and currently it returns:
  {
    "success": false,
    "error": {
      "code": 101,
      "type": "missing_access_key",
      "info": "You have not supplied an API Access Key. [Required format: access_key=YOUR_ACCESS_KEY]"
    }
  }
*/

const API_ACCESS_KEY = "YOUR_API_ACCESS_KEY";
export const API_URL = `https://api.exchangeratesapi.io/v1/latest?access_key=${API_ACCESS_KEY}`;

function App() {
  return (
    <div className="app">
      <header className="app-header">
        Currency converter
      </header>
      <DataController url={API_URL} />
    </div>
  );
}

export default App;
