import React from "react";
import TableRisk from "../../component/TableRisk.jsx";
import Button from "../../component/Button.jsx";
import SubTitle from "../../component/SubTitle.jsx";
import ContentTitle from "../../component/ContentTitle.jsx";
import Modal from "../../component/Modal.jsx";
import { useNavigate } from "react-router";
export default function RiskSet() {
const navigate = useNavigate();
const thead1 = [
"",
"",
"",
"",
"",
"",
];
const key1 = [
"text",
"date",
"text1",
"text4",
"temp",
"text3",];
const content1 = [
{
text: "최근 평균 온도가",
text4: (
),
temp: (
),
text3: "일 경우 위험알림으로 지정합니다.",
},
];
const thead2 = [
"",
"",
"",
];
const key2 = [
"text",
"date",
"text2",];
const content2 = [
{
text: "미복약 횟수가 누적",
date:(
),
text2: "회 이상일 경우 위험알림으로 지정합니다.",
},
];
const thead3 = [
"",
"",
"",
];
const key3 = [
"text",
"date",
"text2",];
const content3 = [
{
text: "배터리 잔량이 최근",
date: (
),
text2: "% 이하일 경우 위험알림으로 지정합니다.",
},
];
const data = [
{
id: 1,
title: "온도 관리",
description: (
),
},
{
id: 2,
title: "복약 관리",
description: (
),
},
{
id: 3,
title: "배터리 관리",
description: (
),
},
];
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}
))}
);
}