Skip to content

Commit 3a9e4a3

Browse files
committed
Use new Tech Scout request info form
1 parent 83d6949 commit 3a9e4a3

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

src/app/pages/partners/partner-details/partner-details.js

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,26 @@ function useRealTitles(books) {
3838
}
3939

4040
// -- RESTORE this to use the new form
41-
// function RequestInfoButton({infoText='Request info', partnerName}) {
42-
// const {toggleForm} = usePartnerContext();
43-
//
44-
// function gotoForm() {
45-
// analyticsEvents.requestInfo(partnerName);
46-
// toggleForm();
47-
// }
48-
//
49-
// return (
50-
// <section>
51-
// <button
52-
// type="button" className="primary"
53-
// onClick={gotoForm}
54-
// >{infoText}</button>
55-
// </section>
56-
// );
57-
// }
41+
function RequestInfoButton({infoText='Request info', partnerName}) {
42+
const {toggleForm} = usePartnerContext();
5843

44+
function gotoForm() {
45+
analyticsEvents.requestInfo(partnerName);
46+
toggleForm();
47+
}
48+
49+
return (
50+
<section>
51+
<button
52+
type="button" className="primary"
53+
onClick={gotoForm}
54+
>{infoText}</button>
55+
</section>
56+
);
57+
}
58+
59+
// -- This uses the old form
60+
/*
5961
function RequestInfoButton({infoUrl, infoText='Request info', partnerName}) {
6062
const {books} = usePartnerContext();
6163
const validTitle = books.find((b) => b.length > 0); // Quirk: no books is an array of one empty string
@@ -79,6 +81,7 @@ function RequestInfoButton({infoUrl, infoText='Request info', partnerName}) {
7981
)
8082
);
8183
}
84+
*/
8285

8386
function Overview({model, icon}) {
8487
const {

0 commit comments

Comments
 (0)