diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx index 59f620a64e..55a5b9e781 100644 --- a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx +++ b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx @@ -1,55 +1,74 @@ -import React from 'react' +import React, { useState } from 'react' import { useTranslation } from 'react-i18next' -import { RiLoginCircleLine } from '@remixicon/react' +import { RiDeleteBinLine, RiEditLine, RiLoginCircleLine } from '@remixicon/react' +import type { EndpointListItem } from '../types' +import ActionButton from '@/app/components/base/action-button' import CopyBtn from '@/app/components/base/copy-btn' import Indicator from '@/app/components/header/indicator' import Switch from '@/app/components/base/switch' -const EndpointCard = () => { +type Props = { + data: EndpointListItem +} + +const EndpointCard = ({ + data, +}: Props) => { const { t } = useTranslation() + const [active, setActive] = useState(data.enabled) + + const handleSwitch = () => { + setActive(!active) + } + return (