/* * Copyright (c) 2026 by Christian Kellner. * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ import { useState } from 'react'; import { Modal, Radio, RadioGroup, Typography } from '@douyinfe/semi-ui-19'; const { Text } = Typography; const ListingDeletionModal = ({ visible, onConfirm, onCancel, title = 'Delete Listings', showOptions = true, message = 'How would you like to delete the selected listing(s)?', }) => { const [deleteType, setDeleteType] = useState('soft'); const handleOk = () => { onConfirm(!showOptions || deleteType === 'hard'); }; return (
{message}
{showOptions && ( setDeleteType(e.target.value)} style={{ width: '100%' }}>
Mark as deleted (Soft Delete)
Listings are kept in the database but marked as hidden. They will not re-appear during the next scraping session.
Remove from database (Hard Delete)
Listings are completely removed from the database.
Consequence: They might re-appear when scraping the next time because Fredy won't know they were previously found.
)}
); }; export default ListingDeletionModal;