File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
app/[locale]/whitepaper/just-in-time-database-access
components/shared/contact-form Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export default function Page() {
2626 < div className = "col-span-7 lg:col-span-full" >
2727 < ContactForm
2828 className = "rounded-2xl bg-white p-8 shadow-dark-big lg:my-10 md:my-8 md:p-6 sm:p-5 sm:px-4 xs:my-7"
29- formId = { WHITE_PAPER }
29+ formId = { WHITE_PAPER + ' - Just-in-time Database Access' }
3030 redirectURL = "/content/whitepaper/just-in-time-database-access/bytebase-whitepaper-just-in-time-database-access-best-practices.pdf"
3131 />
3232 < Logos />
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ const ContactForm = ({
6363 className : string ;
6464 formId : string ;
6565 redirectURL : string ;
66+ comment ?: string ;
6667} ) => {
6768 const [ buttonState , setButtonState ] = useState ( STATES . DEFAULT ) ;
6869 const [ formError , setFormError ] = useState ( '' ) ;
@@ -82,13 +83,17 @@ const ContactForm = ({
8283 setFormError ( '' ) ;
8384
8485 try {
85- if ( formId == VIEW_LIVE_DEMO || formId == ENTERPRISE_INQUIRY || formId == WHITE_PAPER ) {
86+ if (
87+ formId == VIEW_LIVE_DEMO ||
88+ formId == ENTERPRISE_INQUIRY ||
89+ formId . startsWith ( WHITE_PAPER )
90+ ) {
8691 let tag = '' ;
8792 if ( formId == VIEW_LIVE_DEMO ) {
8893 tag = 'demo' ;
8994 } else if ( formId == ENTERPRISE_INQUIRY ) {
9095 tag = 'enterprise-inquiry' ;
91- } else if ( formId == WHITE_PAPER ) {
96+ } else if ( formId . startsWith ( WHITE_PAPER ) ) {
9297 tag = 'white-paper' ;
9398 }
9499 await fetch ( '/api/subscribe' , {
You can’t perform that action at this time.
0 commit comments