Skip to content

Commit ec60957

Browse files
committed
docs: append whitepaper name
1 parent 8ad9382 commit ec60957

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/app/[locale]/whitepaper/just-in-time-database-access/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 />

src/components/shared/contact-form/contact-form.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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', {

0 commit comments

Comments
 (0)