From 2c39f404d8f6ef7cdf838f6058283d021f9b70f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Gustavo?= <166467972+JoaoGustavo-dev@users.noreply.github.com> Date: Thu, 23 Oct 2025 14:23:45 -0300 Subject: [PATCH] add-upload --- susconecta/app/paciente/page.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/susconecta/app/paciente/page.tsx b/susconecta/app/paciente/page.tsx index 30e7f61..9204e4f 100644 --- a/susconecta/app/paciente/page.tsx +++ b/susconecta/app/paciente/page.tsx @@ -1,6 +1,5 @@ 'use client' -import { useState } from 'react' import type { ReactNode } from 'react' import { useState, useEffect } from 'react' import { useRouter } from 'next/navigation' @@ -75,7 +74,7 @@ export default function PacientePage() { // Estado para edição do perfil const [isEditingProfile, setIsEditingProfile] = useState(false) - const [profileData, setProfileData] = useState({ + const [profileData, setProfileData] = useState({ nome: '', email: user?.email || '', telefone: '', @@ -83,6 +82,8 @@ export default function PacientePage() { cidade: '', cep: '', biografia: '', + id: undefined, + foto_url: undefined, }) const [patientId, setPatientId] = useState(null) @@ -218,7 +219,7 @@ export default function PacientePage() { if (process.env.NODE_ENV !== 'production') console.debug('[PacientePage] paciente row', paciente) - setProfileData(prev => ({ ...prev, nome, email: emailFromRow, telefone, endereco, cidade, cep, biografia })) + setProfileData((prev: any) => ({ ...prev, nome, email: emailFromRow, telefone, endereco, cidade, cep, biografia })) } } catch (err) { console.warn('[PacientePage] erro ao carregar paciente', err) @@ -233,7 +234,7 @@ export default function PacientePage() { }, [user?.id, user?.email]) const handleProfileChange = (field: string, value: string) => { - setProfileData(prev => ({ ...prev, [field]: value })) + setProfileData((prev: any) => ({ ...prev, [field]: value })) } const handleSaveProfile = () => { setIsEditingProfile(false)