diff --git a/admin-frontend/src/features/cookieTargetManager/CookieTargetManager.tsx b/admin-frontend/src/features/cookieTargetManager/CookieTargetManager.tsx deleted file mode 100644 index 33fdcae..0000000 --- a/admin-frontend/src/features/cookieTargetManager/CookieTargetManager.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import React, { useState } from 'react'; -import { useParams } from 'react-router-dom'; -import { - Button, Empty, Space, Table, Typography, -} from '@arco-design/web-react'; -import { useDeleteCookieTargetMutation, useGetCookieTargetsQuery } from '../cookieManager/cookieConfigSlice'; -import { CookieTarget } from '../../utils/type'; -import CookieTargetModal from './CookieTargetModal'; - -export default function CookieTargetManager() { - const { cookieId: cookieParam } = useParams(); - if (cookieParam === undefined) { - return ; - } - const cookieId = parseInt(cookieParam, 10); - - const { data: cookieTargets } = useGetCookieTargetsQuery({ cookieId }); - - const [showModal, setShowModal] = useState(false); - const [deleteCookieTarget] = useDeleteCookieTargetMutation(); - const handleAdd = () => { - setShowModal(true); - }; - const handleDelete = (record: CookieTarget) => () => { - deleteCookieTarget({ - cookieId: record.cookie_id, - target: record.target.target, - platformName: record.target.platform_name, - }); - }; - const columns = [ - { - title: '平台名称', - dataIndex: 'target.platform_name', - }, - { - title: '订阅名称', - dataIndex: 'target.target_name', - - }, - { - title: 'Cookie ID', - dataIndex: 'cookie_id', - }, - { - title: '操作', - dataIndex: 'op', - render: (_: null, record: CookieTarget) => ( - - - - ), - - }, - ]; - - return ( - <> - - {`Cookie ${cookieId}`} - - - `${record.target.platform_name}-${record.target.target}`} - scroll={{ x: true }} - /> - - - ); -}