From ff97bae9ecc28467b93324c109afc2666a4afc70 Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Mon, 2 May 2022 21:16:37 -0700 Subject: [PATCH] doc: import sortData and add it to getCountriesData method --- src/App.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App.js b/src/App.js index e324220..3a34a8a 100644 --- a/src/App.js +++ b/src/App.js @@ -10,6 +10,7 @@ import axios from "axios"; import InfoBox from "./InfoBox"; import Map from "./Map"; import Table from "./Table"; +import { sortData } from "./util"; import "./App.css"; function App() { @@ -34,6 +35,8 @@ function App() { name: country.country, value: country.countryInfo.iso2, })); + const sortedData = sortData(data.data); + setTableData(sortedData); setCountries(countries); }); } catch (e) {