Severe security problems, and it is not needed since it only is used locally. Here, it is replaced by a watch script, and relative paths to assets and resources so that index.html can be viewed directly in the browser instead of via a dev server. Also, some minor production preparing stuffs (hiding elements not yet ready) and some ugly white space inconsistecy fixes.
28 lines
767 B
JavaScript
28 lines
767 B
JavaScript
import React, { Component } from 'react';
|
||
|
||
export default class Album extends Component {
|
||
render() {
|
||
const {
|
||
id,
|
||
artist,
|
||
title,
|
||
songs,
|
||
year,
|
||
img,
|
||
purchased_on,
|
||
} = this.props;
|
||
const imagePath = `assets/covers/${img}`;
|
||
const song = songs.join(', ');
|
||
return (
|
||
<article>
|
||
<figure>
|
||
<img src={imagePath} alt="cover" />
|
||
</figure>
|
||
<span>
|
||
#{id+1}: {artist} - {song}, från "{title}" ({year})<br />
|
||
<small>✔️ {purchased_on}</small>
|
||
</span>
|
||
</article>
|
||
)
|
||
}
|
||
}
|