V 1.0.0 erste sauber lauffähige Version
This commit is contained in:
@@ -6,7 +6,6 @@ import { createContext, useContext, useState } from 'react'
|
||||
const FormContext = createContext()
|
||||
|
||||
export function FormProvider({ children }) {
|
||||
console.log('🚀 FormProvider initialisiert')
|
||||
|
||||
const [formData, setFormData] = useState({
|
||||
stattgefunden: '',
|
||||
@@ -20,19 +19,16 @@ export function FormProvider({ children }) {
|
||||
})
|
||||
|
||||
const updateFormData = (field, value) => {
|
||||
console.log('📝 FormContext UPDATE:', field, '=', value)
|
||||
setFormData(prev => {
|
||||
const newData = {
|
||||
...prev,
|
||||
[field]: value
|
||||
}
|
||||
console.log('📊 FormContext NEU:', newData)
|
||||
return newData
|
||||
})
|
||||
}
|
||||
|
||||
const resetFormData = () => {
|
||||
console.log('🔄 FormContext RESET')
|
||||
|
||||
setFormData({
|
||||
stattgefunden: '',
|
||||
|
||||
Reference in New Issue
Block a user