import React, { Component } from 'react'; export default class Modal extends Component { handleKeyPress(e, callback) { alert("sdsdsd") console.log(e.charCode) callback(); } render() { const { id, artist, title, songs, year, img, description, handleOnClick, } = this.props; if (id === undefined) { return ''; } const imagePath = `assets/covers/${img}`; const song = songs.join(', '); return (
this.handleKeyPress(e, handleOnClick)}>
#{id+1}: {artist} - {song}, från "{title}" ({year})
{description.split('\n\n').map(text => (

{text}

))}
); } }