mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-10 12:29:49 +03:00
Sort proof by timestamp (#492)
This commit is contained in:
parent
96b8def9da
commit
bd3f816ef6
@ -36,11 +36,11 @@ const cols = [
|
||||
export default function FarmLastAttemptedProof() {
|
||||
const { size } = usePlots();
|
||||
|
||||
const lastAttemtedProof = useSelector(
|
||||
const lastAttemptedProof = useSelector(
|
||||
(state: RootState) => state.farming_state.farmer.last_farming_info ?? [],
|
||||
);
|
||||
const reducedLastAttemtedProof = lastAttemtedProof.slice(0, 5);
|
||||
const isEmpty = !reducedLastAttemtedProof.length;
|
||||
const reducedLastAttemptedProof = lastAttemptedProof.slice(0, 5).sort((a,b) => a.timestamp-b.timestamp);
|
||||
const isEmpty = !reducedLastAttemptedProof.length;
|
||||
|
||||
return (
|
||||
<Card
|
||||
@ -61,7 +61,7 @@ export default function FarmLastAttemptedProof() {
|
||||
>
|
||||
<Table
|
||||
cols={cols}
|
||||
rows={reducedLastAttemtedProof}
|
||||
rows={reducedLastAttemptedProof}
|
||||
caption={
|
||||
isEmpty && (
|
||||
<Typography>
|
||||
|
Loading…
Reference in New Issue
Block a user