You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
789 B
23 lines
789 B
import React from "react";
|
|
import { useEffect, useState } from "react";
|
|
import { Link, useParams } from "react-router-dom";
|
|
var JSONPretty = require('react-json-pretty');
|
|
import JSONPrettyMon from 'react-json-pretty/themes/monikai.css';
|
|
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(JSON.parse(x)) )
|
|
}, [])
|
|
|
|
return (
|
|
<div>
|
|
<h1 className="t-page-header">Patiënt</h1>
|
|
{patient ? <JSONPretty id="json-pretty" theme={JSONPrettyMon} data={patient}></JSONPretty> : null}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Patient; |