-
Notifications
You must be signed in to change notification settings - Fork 0
/
BulletinBoard.js
39 lines (35 loc) · 1.13 KB
/
BulletinBoard.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import React from 'react';
import Timer from './Timer.js'
import washiTape from "../styles/image/washiTape.png";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faHandHoldingHeart } from "@fortawesome/free-solid-svg-icons";
class BulletinBoard extends React.Component {
render() {
const likeIcon = <FontAwesomeIcon icon={faHandHoldingHeart} />;
return (
<main className="bulletinBoard">
<div className="wrapper">
<ul>
{this.props.messages.map(message => {
return (
<li key={message.key} tabIndex="0">
<img src={washiTape} alt="" />
{message.userMessage}
<button
onClick={() => {
this.props.addNewLikeCount(message.key);
}}
>
<p>{message.likes}</p>
<i aria-hidden="true">{likeIcon}</i>
</button>
</li>
);
})}
</ul>
</div>
</main>
);
}
}
export default BulletinBoard;