Richard Ramos f821569301
chore: rename org to @embarklabs (#62)
* chore: rename org to @embarklabs
* fix: remove yarn-error.log
2020-01-22 15:44:51 -04:00

20 lines
542 B
JavaScript

import React from "react";
import { observe } from "@embarklabs/subspace/react";
const RankItem = ({ items, onUpvote, onDownvote }) => {
if (!items) return null;
return items.map((item, i) => (
<div key={i} className="item">
<b>{i + 1}</b> - {item.addr}
<br />
Upvotes: {item.upvotes} - Downvotes: {item.downvotes}
<br />
<button onClick={onUpvote(item.addr)}>Upvote</button> |{" "}
<button onClick={onDownvote(item.addr)}>Downvote</button>
</div>
));
};
export default observe(RankItem);