import { useEffect, useState } from 'react'; import { paramCase } from 'change-case'; import { useParams, useLocation } from 'react-router-dom'; // @mui import { Container, Stack } from '@mui/material'; import useSettings from '../../../hooks/useSettings'; import Page from '../../../components/Page'; import Form from './Form'; import HeaderBreadcrumbs from '../../../components/HeaderBreadcrumbs'; import axios from '../../../utils/axios'; import { Practitioner } from '../../../@types/doctor'; import ButtonBack from '../../../components/ButtonBack'; export default function Create() { const { themeStretch } = useSettings(); const { id } = useParams(); const isEdit = id ? true : false; const [currentPractitioner, setCurrentPractitioner] = useState(); useEffect(() => { if (isEdit) { axios.get('/doctors/' + id).then((res) => { setCurrentPractitioner(res.data); }); } }, [id]); return ( {/* */}
); } // const pageTitle = 'Create Data Dokter'; // return ( // // // // // // // // // // // // // ); // }