From d422cad43fe9a1392f965bb4ab817d1e7051ff78 Mon Sep 17 00:00:00 2001 From: Ruan Bueno Date: Thu, 28 May 2026 11:02:04 -0300 Subject: [PATCH] fix: remover type assertions desnecessarios em emotion-ruler-form Co-Authored-By: Claude Sonnet 4.6 --- src/components/admin/emotion-ruler/emotion-ruler-form.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/admin/emotion-ruler/emotion-ruler-form.tsx b/src/components/admin/emotion-ruler/emotion-ruler-form.tsx index 43157d4..fdb7833 100644 --- a/src/components/admin/emotion-ruler/emotion-ruler-form.tsx +++ b/src/components/admin/emotion-ruler/emotion-ruler-form.tsx @@ -109,14 +109,14 @@ export function EmotionRulerForm({ const handleUpdateEmotion = (emotionValue: number, field: keyof Emotion, value: string | number | null | undefined) => { setEmotions(emotions.map((e) => - e.value === emotionValue ? { ...e, [field]: value } as Emotion : e + e.value === emotionValue ? { ...e, [field]: value } : e )) } const handleAddState = (emotionValue: number) => { setEmotions(emotions.map((e) => e.value === emotionValue - ? { ...e, states: [...(e.states ?? []), ""] } as Emotion + ? { ...e, states: [...(e.states ?? []), ""] } : e )) } @@ -124,7 +124,7 @@ export function EmotionRulerForm({ const handleUpdateState = (emotionValue: number, stateIndex: number, value: string) => { setEmotions(emotions.map((e) => e.value === emotionValue - ? { ...e, states: e.states.map((state, i) => i === stateIndex ? value : state) } as Emotion + ? { ...e, states: e.states.map((state, i) => i === stateIndex ? value : state) } : e )) } @@ -132,7 +132,7 @@ export function EmotionRulerForm({ const handleRemoveState = (emotionValue: number, stateIndex: number) => { setEmotions(emotions.map((e) => e.value === emotionValue - ? { ...e, states: e.states.filter((_, i) => i !== stateIndex) } as Emotion + ? { ...e, states: e.states.filter((_, i) => i !== stateIndex) } : e )) }