Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const newTo = {
- pathname: "/menu",
- param1: p.id,
- param2: p.caption,
- param3:p.currentMatchday,
- param4:p.numberOfMatchdays,
- param5:p.numberOfTeams,
- param6:p.numberOfGames,
- param7:p.lastUpdated
- };
- return(
- <div className="col-md-3 centered" key={p.id}>
- <div className="hello">
- <img className="ing" src="https://cdn0.iconfinder.com/data/icons/cup/154/football-shield-club-sport-512.png" alt="Card image cap"/>
- <div className="card-body">
- <h5 className="card-title black"> {p.caption} </h5>
- <Link to={newTo} className="btn btn-primary">GO somewhere</Link>
- </div>
- </div>
- </div>
- );
- class menuLigues extends Component {
- constructor(props){
- super(props)
- this.state = {
- ide: '',
- caption: '',
- currentMatchday: '',
- numberOfMatchdays: '',
- numberOfTeams: '',
- numberOfGames: '',
- lastUpdated: ''
- };
- }
- componentDidMount(){
- this.setState({
- id: this.props.location.param1,
- caption: this.props.location.param2,
- currentMatchday: this.props.location.param3,
- numberOfMatchdays: this.props.location.param4,
- numberOfTeams: this.props.location.param5,
- numberOfGames: this.props.location.param6,
- lastUpdated: this.props.location.param7
- });
- }
- }
Add Comment
Please, Sign In to add comment