CMS form select options

This commit is contained in:
Fede Álvarez 2022-06-01 19:24:24 +02:00
parent 47f256445d
commit b91289cc93
5 changed files with 57 additions and 62 deletions

View File

@ -14,6 +14,10 @@ interface Props {
formWarning: string
formLabelPartner: string
formPlaceholderPartner: string
formSelectOptions: {
value: string
label: string
}[]
formLabelEmail: string
formPlaceholderEmail: string
formLabelMsg: string
@ -23,14 +27,6 @@ interface Props {
}
const Form = ({ data }: Props) => {
const selectOptions = [
{ value: 'Partnership', label: 'Partnership' },
{ value: 'Validator/Member', label: 'Validator/Member' },
{ value: 'Investor', label: 'Investor' },
{ value: 'Press', label: 'Press' },
{ value: 'Marketing', label: 'Marketing' }
]
const [selectedOption, setSelectedOption] = useState<any>(null)
return (
@ -46,16 +42,6 @@ const Form = ({ data }: Props) => {
<div>
<label htmlFor="partnership">
{data?.formLabelPartner}
{/* <select name="partnership" id="partnership" required>
<option value="" hidden>
{data?.formPlaceholderPartner}
</option>
<option value="Partnership">Partnership</option>
<option value="Validator/Member">Validator/Member</option>
<option value="Investor">Investor</option>
<option value="Press">Press</option>
<option value="Marketing">Marketing</option>
</select> */}
<Select
instanceId={'Contact'}
className="select"
@ -63,7 +49,7 @@ const Form = ({ data }: Props) => {
placeholder={data?.formPlaceholderPartner}
value={selectedOption}
onChange={setSelectedOption}
options={selectOptions}
options={data?.formSelectOptions}
/>
</label>
<label htmlFor="email">

View File

@ -27,6 +27,10 @@ interface Props {
contactCompanyPlaceholder: string
contactInquiryLabel: string
contactInquiryPlaceholder: string
contactInquiryOptions: {
value: string
label: string
}[]
contactMsgLabel: string
contactMsgPlaceholder: string
contactButtonLabel: string
@ -34,13 +38,6 @@ interface Props {
}
const Contact = ({ data }: Props) => {
const selectOptions = [
{ value: 'Validator/Member', label: 'Validator/Member' },
{ value: 'Investor', label: 'Investor' },
{ value: 'Developer', label: 'Developer' },
{ value: 'Customer', label: 'Prospective Customer' }
]
const [selectedOption, setSelectedOption] = useState<any>(null)
return (
@ -121,7 +118,7 @@ const Contact = ({ data }: Props) => {
placeholder={data?.contactInquiryPlaceholder}
value={selectedOption}
onChange={setSelectedOption}
options={selectOptions}
options={data?.contactInquiryOptions}
/>
</label>
</div>

View File

@ -64,13 +64,15 @@ const Opportunities = ({ data }: Props) => {
<div className={s.text__container}>
<p>{data?.oportunitiesDesc01}</p>
</div>
<ul>
{data?.oportunitiesItem01Links?.map((item) => (
<li key={item.label}>
<Link href={item.link}>{item.label}</Link>
</li>
))}
</ul>
{data?.oportunitiesItem01Links && (
<ul>
{data?.oportunitiesItem01Links?.map((item, i) => (
<li key={i}>
<Link href={item?.link}>{item?.label}</Link>
</li>
))}
</ul>
)}
</div>
</div>
<div className={s.block} id="providers">
@ -93,13 +95,15 @@ const Opportunities = ({ data }: Props) => {
<div className={s.text__container}>
<p>{data?.oportunitiesDesc02}</p>
</div>
<ul>
{data?.oportunitiesItem02Links?.map((item) => (
<li key={item.label}>
<Link href={item.link}>{item.label}</Link>
</li>
))}
</ul>
{data?.oportunitiesItem02Links && (
<ul>
{data?.oportunitiesItem02Links?.map((item, i) => (
<li key={i}>
<Link href={item?.link}>{item?.label}</Link>
</li>
))}
</ul>
)}
</div>
</div>
<div className={s.block} id="developers">
@ -122,13 +126,15 @@ const Opportunities = ({ data }: Props) => {
<div className={s.text__container}>
<p>{data?.oportunitiesDesc03}</p>
</div>
<ul>
{data?.oportunitiesItem03Links?.map((item) => (
<li key={item.label}>
<Link href={item.link}>{item.label}</Link>
</li>
))}
</ul>
{data?.oportunitiesItem03Links && (
<ul>
{data?.oportunitiesItem03Links?.map((item, i) => (
<li key={i}>
<Link href={item?.link}>{item?.label}</Link>
</li>
))}
</ul>
)}
</div>
</div>
<div className={s.block} id="investors">
@ -151,13 +157,15 @@ const Opportunities = ({ data }: Props) => {
<div className={s.text__container}>
<p>{data?.oportunitiesDesc04}</p>
</div>
<ul>
{data?.oportunitiesItem04Links?.map((item) => (
<li key={item.label}>
<Link href={item.link}>{item.label}</Link>
</li>
))}
</ul>
{data?.oportunitiesItem04Links && (
<ul>
{data?.oportunitiesItem04Links?.map((item, i) => (
<li key={i}>
<Link href={item?.link}>{item?.label}</Link>
</li>
))}
</ul>
)}
</div>
</div>
<div className={s.block} id="testnet">
@ -180,13 +188,15 @@ const Opportunities = ({ data }: Props) => {
<div className={s.text__container}>
<p>{data?.oportunitiesDesc05}</p>
</div>
<ul>
{data?.oportunitiesItem05Links?.map((item) => (
<li key={item.label}>
<Link href={item.link}>{item.label}</Link>
</li>
))}
</ul>
{data?.oportunitiesItem05Links && (
<ul>
{data?.oportunitiesItem05Links?.map((item, i) => (
<li key={i}>
<Link href={item?.link}>{item?.label}</Link>
</li>
))}
</ul>
)}
</div>
</div>
</Container>

View File

@ -22,6 +22,7 @@ const ContactForm = {
formPlaceholderMsg
formLabelPartner
formPlaceholderPartner
formSelectOptions
formLabelButton
}
}`

View File

@ -46,6 +46,7 @@ const PartnersContact = {
contactHeading
contactInquiryLabel
contactInquiryPlaceholder
contactInquiryOptions
contactLegalLabel
contactLegalPlaceholder
contactMsgLabel