diff --git a/src/FilterLists.Web/package-lock.json b/src/FilterLists.Web/package-lock.json index 4a376a8bf..c550b33d1 100644 Binary files a/src/FilterLists.Web/package-lock.json and b/src/FilterLists.Web/package-lock.json differ diff --git a/src/FilterLists.Web/package.json b/src/FilterLists.Web/package.json index a9220a476..45bf9eafd 100644 --- a/src/FilterLists.Web/package.json +++ b/src/FilterLists.Web/package.json @@ -9,7 +9,6 @@ "@types/react-dom": "16.8.5", "@types/react-router-dom": "^4.3.4", "@types/react-table": "^6.8.5", - "axios": "^0.19.0", "bootstrap": "^4.3.1", "es6-promise": "^4.2.8", "moment": "^2.24.0", diff --git a/src/FilterLists.Web/src/modules/home/HomeContainer.tsx b/src/FilterLists.Web/src/modules/home/HomeContainer.tsx index d13a8a634..0c0ea906a 100644 --- a/src/FilterLists.Web/src/modules/home/HomeContainer.tsx +++ b/src/FilterLists.Web/src/modules/home/HomeContainer.tsx @@ -1,4 +1,3 @@ -import axios from "axios"; import * as React from "react"; import { Home } from "./Home"; import { ILicense } from "./interfaces/ILicense"; @@ -46,38 +45,45 @@ export class HomeContainer extends React.Component<{}, IState> { }; fetchLanguages() { - axios.request({ url: "/api/v1/languages" }) - .then(l => { this.setState({ languages: l.data }); }) + fetch("/api/v1/languages") + .then(response => response.json()) + .then(json => { this.setState({ languages: json }); }) }; fetchLicenses() { - axios.request({ url: "/api/v1/licenses" }) - .then(l => { this.setState({ licenses: l.data }); }) + fetch("/api/v1/licenses") + .then(response => response.json()) + .then(json => { this.setState({ licenses: json }); }) }; fetchLists() { - axios.request({ url: "/api/v1/lists" }) - .then(l => { this.setState({ lists: l.data }); }) + fetch("/api/v1/lists") + .then(response => response.json()) + .then(json => { this.setState({ lists: json }); }) }; fetchMaintainers() { - axios.request({ url: "/api/v1/maintainers" }) - .then(l => { this.setState({ maintainers: l.data }); }) + fetch("/api/v1/maintainers") + .then(response => response.json()) + .then(json => { this.setState({ maintainers: json }); }) }; fetchSoftware() { - axios.request({ url: "/api/v1/software" }) - .then(l => { this.setState({ software: l.data }); }) + fetch("/api/v1/software") + .then(response => response.json()) + .then(json => { this.setState({ software: json }); }) }; fetchSyntaxes() { - axios.request({ url: "/api/v1/syntaxes" }) - .then(l => { this.setState({ syntaxes: l.data }); }) + fetch("/api/v1/syntaxes") + .then(response => response.json()) + .then(json => { this.setState({ syntaxes: json }); }) }; fetchTags() { - axios.request({ url: "/api/v1/tags" }) - .then(l => { this.setState({ tags: l.data }); }) + fetch("/api/v1/tags") + .then(response => response.json()) + .then(json => { this.setState({ tags: json }); }) }; render() {