Skip to content

Commit 518fc81

Browse files
authored
Do not show p2p FAQ item if metadata.hideFundraiseButton (#444)
1 parent 332e653 commit 518fc81

File tree

1 file changed

+7
-4
lines changed
  • packages/donate-button-v4/src/components/widget/components/Faq

1 file changed

+7
-4
lines changed

packages/donate-button-v4/src/components/widget/components/Faq/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,11 @@ export const Faq = () => {
117117
</p>
118118
</Fragment>
119119
)
120-
},
121-
{
120+
}
121+
];
122+
123+
if (!nonprofit?.metadata?.hideFundraiseButton) {
124+
faqDataList.push({
122125
id: 'p2p',
123126
mobileOnly: true,
124127
hideSlugList: ['irc'],
@@ -135,8 +138,8 @@ export const Faq = () => {
135138
</a>
136139
</p>
137140
)
138-
}
139-
];
141+
});
142+
}
140143

141144
return (
142145
<GridCard>

0 commit comments

Comments
 (0)