Kopie van https://gitlab.com/studieverenigingvia/ict/centurion met een paar aanpassingen
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
748 B
30 lines
748 B
5 years ago
|
import React from 'react';
|
||
|
import {TimestampEvent} from "../types/types";
|
||
|
import '../css/feeditem.sass'
|
||
|
import shot from "../img/shot.png";
|
||
|
import song from "../img/song.png";
|
||
|
import talk from "../img/talk.png";
|
||
|
import time from "../img/time.png";
|
||
|
|
||
|
const images = {
|
||
|
shot, song, talk, time
|
||
|
};
|
||
|
|
||
|
const FeedItem = (item: TimestampEvent) => {
|
||
|
return (
|
||
|
<div className="feed-item">
|
||
|
<div className="feed-item__title">
|
||
|
{item.text[0]}
|
||
|
</div>
|
||
|
<div className="feed-item__emoji">
|
||
|
<img src={images[item.type]}/>
|
||
|
</div>
|
||
|
<div className="feed-item__desc">
|
||
|
{item.text[1]}
|
||
|
</div>
|
||
|
</div>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default FeedItem;
|