We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a9e4a3 commit 4d2c4f8Copy full SHA for 4d2c4f8
src/app/pages/partners/partner-details/partner-details.js
@@ -39,13 +39,18 @@ function useRealTitles(books) {
39
40
// -- RESTORE this to use the new form
41
function RequestInfoButton({infoText='Request info', partnerName}) {
42
- const {toggleForm} = usePartnerContext();
+ const {toggleForm, books} = usePartnerContext();
43
+ const validTitle = books.find((b) => b.length > 0); // Quirk: no books is an array of one empty string
44
45
function gotoForm() {
46
analyticsEvents.requestInfo(partnerName);
47
toggleForm();
48
}
49
50
+ if (!validTitle) {
51
+ return null;
52
+ }
53
+
54
return (
55
<section>
56
<button
0 commit comments