import React, { useEffect, useState } from "react"; import avatarPlaceholder from '../assets/images/avatar_placeholder.png'; const Details = ({ patientID, setCurrentPage }) => { const [paciente, setPaciente] = useState({}); useEffect(() => { if (!patientID) return; fetch(`https://mock.apidog.com/m1/1053378-0-default/pacientes/${patientID}`) .then(res => res.json()) .then(data => setPaciente(data)) .catch(err => console.error("Erro ao buscar médico:", err)); }, [patientID]); //if (!paciente) return
Carregando...
; return ( <>{paciente.cpf || "CPF"}
{paciente.nome || "-"}
{paciente.nomeSocial || "-"}
{paciente.dataNascimento || "-"}
{paciente.sexo || "-"}
{paciente.cpf || "-"}
{paciente.rg || "-"}
{paciente.documento || "-"}
{paciente.numeroDocumento || "-"}
{paciente.etniaRaca || "-"}
{paciente.etniaRaca || "-"}
{paciente.etniaRaca || "-"}
{paciente.profissao || "-"}
{paciente.estadoCivil || "-"}
{paciente.nomeConjuge || "-"}
{paciente.outroId || "-"}
{paciente.observacoes || "-"}
{ "-"}
{paciente.cep || "-"}
{paciente.rua || "-"}
{paciente.bairro || "-"}
{paciente.cidade || "-"}
{paciente.estado || "-"}
{paciente.numero || "-"}
{paciente.complemento || "-"}
{paciente.email || "-"}
{paciente.telefone1 || "-"}
{paciente.telefone2 || "-"}
{paciente.telefone3 || "-"}