1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-22 22:54:22 +00:00

Fix missing deps

This commit is contained in:
Steffo 2022-07-19 20:32:13 +02:00
parent 9c31ae8340
commit 486050587f
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -11,6 +11,9 @@ export type EventsActionViewProps = {
export const EventsActionEdit = ({ data, mutate }: EventsActionViewProps) => { export const EventsActionEdit = ({ data, mutate }: EventsActionViewProps) => {
const name = data.name
const description = data.description
return ( return (
<ViewContent <ViewContent
title={ title={
@ -18,11 +21,11 @@ export const EventsActionEdit = ({ data, mutate }: EventsActionViewProps) => {
() => ( () => (
<input <input
type="text" type="text"
value={data.name} value={name}
onChange={e => mutate({ ...data, name: e.target.value }, { revalidate: false })} onChange={e => mutate({ ...data, name: e.target.value }, { revalidate: false })}
/> />
), ),
[data.name] [mutate, name]
) )
} }
content={<> content={<>
@ -30,11 +33,11 @@ export const EventsActionEdit = ({ data, mutate }: EventsActionViewProps) => {
() => ( () => (
<textarea <textarea
rows={12} rows={12}
value={data.description} value={description}
onChange={e => mutate({ ...data, description: e.target.value }, { revalidate: false })} onChange={e => mutate({ ...data, description: e.target.value }, { revalidate: false })}
/> />
), ),
[data.description] [mutate, description]
)} )}
</>} </>}
/> />