offers wip

This commit is contained in:
ntr committed 2022-08-23 00:02:50 +10:00
1 parent 453c2da045
commit deb9eb3fc2
16 files changed
+276 -88

No files matched your search

+9 -13
View File
@@ -1,19 +1,15 @@
import { h } from 'preact';
import { ExternalLink } from 'react-feather';
export default function Bundle(bundle) {
export default function Offer(offer) {
const { want: { data: details } } = offer;
return (
<div class="bundle">
<h3>{bundle.items.length} items - {bundle.total.toFixed(2)} {bundle.currency}</h3>
{bundle.items.map(i => (
<div key={i.id}>
<a href={i.uri} target="_blank" >
<h4>{i.description}</h4>
</a>
<h5>{i.user.name}</h5>
<h5>{i.price} {i.currency}</h5>
<hr />
</div>
))}
<div class="offer">
<h2>{details.artists_sort} - {details.title} <a href={details.uri} target="_blank"><ExternalLink /></a></h2>
<h5 class='alt-text' >{details.year}</h5>
<h5 class='alt-text'>{details.formats[0].descriptions.join(' ')}</h5>
<img src={details.thumb} />
<h5>${offer.total}</h5>
</div>
)
}