import React, { useState } from "react"; import ContentTitle from "../../component/ContentTitle.jsx"; import SubTitle from "../../component/SubTitle.jsx"; import Modal from "../../component/Modal.jsx"; import Table from "../../component/Table.jsx"; import Button from "../../component/Button.jsx"; import { useNavigate } from "react-router"; import { width } from "@mui/system"; import DetailSearch from "../../component/DetailSearch.jsx"; import DetailTitle from "../../component/DetailTitle.jsx"; export default function UserAuthoriySelect() { const navigate = useNavigate(); const [tapName, setTapName] = useState("복약관리") const thead = [ "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "최근 복약률", ]; const key = [ "No", "name", "number", "birth", "phone", "address", "average" ]; const content = [ { No: 1, name: "김복남", number: "00000001", birth: "1948.11.15", phone: "010-1234-5678", address: "경상북도 군위군 삼국유사면", agency: "A복지관", protect: "홍길동", average: "0%", }, ]; const thead1 = [ "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", "최근 최저 온도", "최근 최고 온도", ]; const key1 = ["No", "name", "number", "birth", "phone", "address", "low", "high" ]; const content1 = [ { No: 1, name: "김복남", number: "00000001", birth: "1948.11.15", phone: "010-1234-5678", address: "경상북도 군위군 삼국유사면", agency: "A복지관", protect: "홍길동", high: "18°C", low: "18°C", } ]; const thead2 = [ "No", "이름", "대상자등록번호", "생년월일", "연락처", "주소", , "최근 방문일", "방문목적", "상세사유", ]; const key2 = [ "No", "name", "number", "birth", "phone", "address", "visit", "reason", "reason_detail" ]; const content2 = [ { No: 1, name: "김복남", number: "00000001", birth: "1948.11.15", phone: "010-1234-5678", address: "경상북도 군위군 삼국유사면", visit: "2023.02.08", reason: "정기방문", reason_detail: "정기방문일", }, ]; const data = [ { id: 1, title: "복약관리", description: ( { navigate("/MedicineCareSelectOne"); }} /> ), }, { id: 2, title: "댁내온도관리", description: (
{ navigate("/TemperatureManagementSelectOne"); }} /> ), }, { id: 3, title: "방문관리", description: (
{ navigate("/VisitSelectOne"); }} /> ), }, ] const [index, setIndex] = React.useState(1); return (
    {data.map((item) => (
  • setIndex(item.id)} > {item.title}
  • ))}
    {data .filter((item) => index === item.id) .map((item) => (
  • {item.description}
  • ))}
); }