From 271e3e7a725c3509ffb76f78b8433748d132074e Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Sat, 12 Oct 2024 13:37:17 +0800 Subject: [PATCH] =?UTF-8?q?:wastebasket:=20=E5=88=A0=E9=99=A4=E6=97=A7?= =?UTF-8?q?=E7=9A=84CookieTargetManager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CookieTargetManager.tsx | 77 ------------------- 1 file changed, 77 deletions(-) delete mode 100644 admin-frontend/src/features/cookieTargetManager/CookieTargetManager.tsx 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 }} - /> - - - ); -}