import React from "react";
import { useEffect, useState } from "react";
import { Link, useParams } from "react-router-dom";
import "./Index.css";

const Patient = () => {
    let params = useParams();
    const [patient, setPatient] = useState(null)
    useEffect(() => {
        fetch(`/api/connections/${params.connId}/${params.serviceId}/${params.patientId}`).then(x => x.text()).then(x => setPatient(x) )
    }, [])

    return (
        <div>
            <h1 className="t-page-header">Patient</h1>
           {patient ? <div dangerouslySetInnerHTML={{__html: patient}}></div> : null}
        </div>
    );
};

export default Patient;