File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
packages/logos-docusaurus-theme/src/client/components/mdx/InputCTASection Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export type InputCTASectionProps = {
1212 linkProps ?: Props
1313 formInput ?: any [ ]
1414 buType ?: buType
15+ newsletterId ?: number
1516}
1617
1718type buType = 'codex' | 'waku' | 'nomos'
@@ -24,6 +25,7 @@ export const InputCTASection: React.FC<InputCTASectionProps & Props> = ({
2425 linkProps,
2526 formInput,
2627 buType,
28+ newsletterId = null ,
2729} ) => {
2830 const [ formState , setFormState ] = React . useState ( { email : '' , name : '' } )
2931 const [ message , setMessage ] = React . useState ( '' )
@@ -49,11 +51,19 @@ export const InputCTASection: React.FC<InputCTASectionProps & Props> = ({
4951 body : JSON . stringify ( {
5052 jsonrpc : '2.0' ,
5153 method : 'call' ,
52- params : {
53- email : formState ?. email ,
54- type : buType ,
55- subscription_type : 'email' ,
56- } ,
54+ params :
55+ newsletterId == null
56+ ? {
57+ email : formState ?. email ,
58+ type : buType ,
59+ subscription_type : 'email' ,
60+ }
61+ : {
62+ email : formState ?. email ,
63+ type : buType ,
64+ subscription_type : 'email' ,
65+ newsletterId : newsletterId ,
66+ } ,
5767 } ) ,
5868 } ,
5969 )
You can’t perform that action at this time.
0 commit comments