mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
60 lines
1.5 KiB
JavaScript
60 lines
1.5 KiB
JavaScript
import React, { useContext } from 'react'
|
|
import { AppContext } from '../context/appStore'
|
|
import Required from './required'
|
|
|
|
export default function Contact() {
|
|
const { state, onChangeEvent } = useContext(AppContext)
|
|
|
|
const { formDataChanged } = state
|
|
const { purpose, destination, org } = state.formData
|
|
|
|
return (
|
|
<>
|
|
<div className="fsw">
|
|
<div className="fs">
|
|
<label className="flabel">
|
|
Zweck der Fahrt <Required />
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="purpose"
|
|
value={purpose}
|
|
onChange={onChangeEvent}
|
|
required
|
|
className={`input-text ${
|
|
formDataChanged.includes('purpose') && 'input-changed'
|
|
}`}
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div className="fsw">
|
|
<div className="fs">
|
|
<label className="flabel">
|
|
Ziel der Fahrt <Required />
|
|
</label>
|
|
<input
|
|
type="text"
|
|
name="destination"
|
|
value={destination}
|
|
onChange={onChangeEvent}
|
|
required
|
|
className="input-text"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div className="fsw">
|
|
<div className="fs">
|
|
<label className="flabel">Verein</label>
|
|
<input
|
|
type="text"
|
|
name="org"
|
|
value={org}
|
|
onChange={onChangeEvent}
|
|
className="input-text"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</>
|
|
)
|
|
}
|