Skip to content

Commit

Permalink
Fix the story
Browse files Browse the repository at this point in the history
  • Loading branch information
thesan committed Aug 18, 2023
1 parent 548fc6d commit 48e898d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ export default {
title: PROPOSAL_DATA.title,
description: PROPOSAL_DATA.description,
status,
type:
args.type === 'FundingRequestMultipleRecipientsProposalDetails'
? 'FundingRequestProposalDetails'
: args.type,
type: args.type,
creator: args.isProposer ? alice : bob,

discussionThread: {
Expand Down
8 changes: 4 additions & 4 deletions packages/ui/src/mocks/data/proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ const proposalDetails = {
VetoProposalDetails: { proposal: { __typename: 'Proposal', id: '0', title: random.words(4) } },
} as Record<string, RecursivePartial<ProposalWithDetailsFieldsFragment['details']>>

export const proposalDetailsMap = mapValues(
proposalDetails,
(value, __typename) => Object.assign(value, { __typename }) as Partial<ProposalWithDetailsFieldsFragment['details']>
)
export const proposalDetailsMap = mapValues(proposalDetails, (value, key) => {
const __typename = key === 'FundingRequestMultipleRecipientsProposalDetails' ? 'FundingRequestProposalDetails' : key
return Object.assign(value, { __typename }) as Partial<ProposalWithDetailsFieldsFragment['details']>
})

export const proposalTypes = Object.keys(proposalDetailsMap) as ProposalDetailsType[]

Expand Down

0 comments on commit 48e898d

Please sign in to comment.