Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanups
  • Loading branch information
jacogr committed Jan 12, 2021
commit a9e03dcf1b1ff0000d06b1b1a40036a5882916bb
10 changes: 6 additions & 4 deletions packages/page-parachains/src/Overview/Proposals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ interface Props {
}

const transformProposals = {
transform: (entries: [{ args: [ParaId] }, Option<ParachainProposal>][]): ProposalExt[] => {
return entries
transform: (entries: [{ args: [ParaId] }, Option<ParachainProposal>][]): ProposalExt[] =>
entries
.filter(([, opt]) => opt.isSome)
.map(([{ args: [id] }, optProposal]) => ({ id, proposal: optProposal.unwrap() }));
}
.map(([{ args: [id] }, optProposal]) => ({
id,
proposal: optProposal.unwrap()
}))
};

function Proposals (): React.ReactElement<Props> {
Expand Down