@@ -12,8 +12,6 @@ import { GlobalStyle } from 'ts/constants/globalStyle';
1212import { colors } from 'ts/style/colors' ;
1313import { utils } from 'ts/utils/utils' ;
1414
15- // const products = ['0x Swap API'] as const;
16-
1715const timelineForIntegrationOptions = [
1816 'I’ve already integrated!' ,
1917 '0-3 months' ,
@@ -81,7 +79,7 @@ export class ModalContact extends React.Component<Props> {
8179 isApplicationLive : false ,
8280 currentTradingVolume : '0' ,
8381 link : '' ,
84- // productOfInterest: '0x Swap API' ,
82+ productOfInterest : [ ] as string [ ] ,
8583 chainOfInterest : '' ,
8684 chainOfInterestOther : '' ,
8785 usageDescription : '' ,
@@ -203,7 +201,7 @@ export class ModalContact extends React.Component<Props> {
203201 < InputRow >
204202 < Input
205203 name = "companyName"
206- label = "Name of Company"
204+ label = "Company Name "
207205 type = "text"
208206 value = { this . state . companyName }
209207 required = { true }
@@ -270,29 +268,55 @@ export class ModalContact extends React.Component<Props> {
270268 < InputRow >
271269 < Input
272270 name = "linkToProductOrWebsite"
273- label = "Link to Product or Website"
271+ label = "Company Website"
274272 type = "text"
275273 value = { this . state . linkToProductOrWebsite }
276274 required = { false }
277275 errors = { errors }
278276 onChange = { this . _makeOnChangeHandler ( 'linkToProductOrWebsite' ) }
279277 />
280278 </ InputRow >
281- { /* <InputRow>
282- <GenericDropdown
283- label="Which Products are you interested in?"
284- name="productOfInterest"
285- items={products}
286- defaultValue={this.state.productOfInterest}
287- onItemSelected={(selectedProducts) => {
288- this.setState({ productOfInterest: selectedProducts });
279+ < InputRow >
280+ < StyledSpan > Which Products are you interested in?</ StyledSpan >
281+ </ InputRow >
282+ < InputRow >
283+ < CheckBoxInput
284+ label = "0x API"
285+ isSelected = { this . state . productOfInterest . includes ( '0x Swap API' ) }
286+ onClick = { ( ) => {
287+ if ( this . state . productOfInterest . includes ( '0x Swap API' ) ) {
288+ this . setState ( {
289+ productOfInterest : this . state . productOfInterest . filter (
290+ ( item ) => item !== '0x Swap API' ,
291+ ) ,
292+ } ) ;
293+ } else {
294+ this . setState ( { productOfInterest : [ ...this . state . productOfInterest , '0x Swap API' ] } ) ;
295+ }
296+ } }
297+ />
298+ < CheckBoxInput
299+ label = "Data API (beta)"
300+ isSelected = { this . state . productOfInterest . includes ( 'Data API (beta)' ) }
301+ onClick = { ( ) => {
302+ if ( this . state . productOfInterest . includes ( 'Data API (beta)' ) ) {
303+ this . setState ( {
304+ productOfInterest : this . state . productOfInterest . filter (
305+ ( item ) => item !== 'Data API (beta)' ,
306+ ) ,
307+ } ) ;
308+ } else {
309+ this . setState ( {
310+ productOfInterest : [ ...this . state . productOfInterest , 'Data API (beta)' ] ,
311+ } ) ;
312+ }
289313 } }
290314 />
291- </InputRow> */ }
315+ </ InputRow >
292316 < InputRow >
293317 < Input
294318 name = "usageDescription"
295- label = "How do you plan to use our products?"
319+ label = "How do you plan to use our products? Is there anything else you’d like to discuss? "
296320 type = "textarea"
297321 value = { this . state . usageDescription }
298322 required = { false }
@@ -385,6 +409,7 @@ export class ModalContact extends React.Component<Props> {
385409 usageDescription,
386410 referral,
387411 isApiKeyRequired,
412+ productOfInterest,
388413 } = this . state ;
389414
390415 const body = {
@@ -403,6 +428,7 @@ export class ModalContact extends React.Component<Props> {
403428 usageDescription,
404429 referral,
405430 isApiKeyRequired : `${ isApiKeyRequired } ` ,
431+ productOfInterest : productOfInterest . join ( ',' ) ,
406432 } ;
407433
408434 await fetch ( '/api/contact' , {
0 commit comments