doc: import sortData and add it to getCountriesData method

This commit is contained in:
Leon Xu committed 2022-05-02 21:16:37 -07:00
1 parent bb67a4e801
commit ff97bae9ec
1 file changed
+3
+3
View File
@@ -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) {