diff --git a/package.json b/package.json index a7755e1..0ddb3bf 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "version": "1.0.0", "private": true, "homepage": "/admin", - "proxy": "http://pi.hole", "devDependencies": { "enzyme": "^3.3.0", "enzyme-adapter-react-16": "^1.1.1", diff --git a/src/components/list/DomainList.js b/src/components/list/DomainList.js index fdb011b..e369039 100644 --- a/src/components/list/DomainList.js +++ b/src/components/list/DomainList.js @@ -8,54 +8,60 @@ * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. */ -import React, { Component } from "react"; +import React from "react"; import PropTypes from "prop-types"; import { translate } from "react-i18next"; import api from "../../util/api"; +import { Button } from "reactstrap"; -class DomainList extends Component { - static propTypes = { - domains: PropTypes.arrayOf(PropTypes.string), - onRemove: PropTypes.func.isRequired - }; +const DomainList = ({ domains, onRemove, t }) => { + // Create a button to remove the domain + const removeButton = item => ( + + ); - render() { - const { t } = this.props; + // Map a domain string to a list item + const mapDomainsToListItems = domain => ( +