add prettier and format all

This commit is contained in:
Thomas Ruoff
2021-02-08 22:51:35 +01:00
parent d7044f5f78
commit 78af180567
24 changed files with 266 additions and 297 deletions

View File

@@ -1,24 +1,26 @@
import React from 'react';
import Button from './Button';
import React from 'react'
import Button from './Button'
export default function(props) {
const latest = props.latest || [];
const latestElements = latest.map(item => {
const created = new Date(item.created);
const hrefId = `#item-${item.id}`;
export default function (props) {
const latest = props.latest || []
const latestElements = latest.map((item) => {
const created = new Date(item.created)
const hrefId = `#item-${item.id}`
return (
<li key={item.id}>
<a href={hrefId} onClick={() => props.onSelect(item)}>{created.toLocaleString()}</a>
<span> </span>
<a href={hrefId} onClick={() => props.onSelect(item)}>
{created.toLocaleString()}
</a>
<span> </span>
<Button onClick={() => props.onRemove(item)}>Remove</Button>
</li>
);
});
)
})
return (
<div>
<h4>Vergangene Briefe:</h4>
<ul>{latestElements}</ul>
</div>
);
)
}