brutal-legends/src/containers/modal.js
Anders Ytterström d447143312 Display selected album in Modal
A new Component and Container is introduced: Modal.

It dispatches an UNSELECT_ALBUM action when clicked on.

Some CSS is added to bur out the background and display the modal
content properly.
2019-04-24 09:58:02 +02:00

14 lines
410 B
JavaScript

import React from 'react';
import { connect } from 'react-redux';
import Modal from '../components/modal';
import { unselectAlbum } from '../actions';
const mapStateToProps = state => ({
...state.selectedAlbum,
});
const mapDispatchToProps = dispatch => ({
handleOnClick: album => dispatch(unselectAlbum(album)),
});
export default connect(mapStateToProps, mapDispatchToProps)(Modal);