import React, { Component } from "react"; import SystemCard from "./SystemCard"; import { Container, Divider, Header, Card, Icon, Button, } from "semantic-ui-react"; // ---------------------------------------------------- class ListSystems extends Component { state = { } componentDidMount() { this.props.fetchSystems(); } //https://stackoverflow.com/questions/36559661/how-can-i-dispatch-from-child-components-in-react-redux //https://stackoverflow.com/questions/42597602/react-onclick-pass-event-with-parameter render() { const systems = this.props.system.items; return (
Radio Systems
{systems.map((system) => this.props.changeUrl("/system/" + system.shortName)}/> )}
); } } export default ListSystems;