refactor: remove unused UserHistoryModal and related state management
This commit is contained in:
@@ -21,7 +21,6 @@ import {
|
|||||||
SendOutlined,
|
SendOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { getNotificationDetail, createNotificationLog, getNotificationLogByNotificationId } from '../../api/notification';
|
import { getNotificationDetail, createNotificationLog, getNotificationLogByNotificationId } from '../../api/notification';
|
||||||
import UserHistoryModal from '../notification/component/UserHistoryModal';
|
|
||||||
|
|
||||||
const { Content } = Layout;
|
const { Content } = Layout;
|
||||||
const { Text, Paragraph, Link } = Typography;
|
const { Text, Paragraph, Link } = Typography;
|
||||||
@@ -143,7 +142,6 @@ const NotificationDetailTab = () => {
|
|||||||
const [notification, setNotification] = useState(null);
|
const [notification, setNotification] = useState(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState(null);
|
||||||
const [modalContent, setModalContent] = useState(null); // 'user', atau null
|
|
||||||
const [isAddingLog, setIsAddingLog] = useState(false);
|
const [isAddingLog, setIsAddingLog] = useState(false);
|
||||||
|
|
||||||
// Log history states
|
// Log history states
|
||||||
@@ -506,11 +504,9 @@ const NotificationDetailTab = () => {
|
|||||||
</Space>
|
</Space>
|
||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={24} md={8} style={{ cursor: 'pointer' }}>
|
<Col xs={24} md={8}>
|
||||||
<Card
|
<Card
|
||||||
hoverable
|
|
||||||
bodyStyle={{ padding: '12px', textAlign: 'center' }}
|
bodyStyle={{ padding: '12px', textAlign: 'center' }}
|
||||||
onClick={() => setModalContent('user')}
|
|
||||||
>
|
>
|
||||||
<Space>
|
<Space>
|
||||||
<HistoryOutlined
|
<HistoryOutlined
|
||||||
@@ -860,11 +856,6 @@ const NotificationDetailTab = () => {
|
|||||||
</Card>
|
</Card>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
||||||
<UserHistoryModal
|
|
||||||
visible={modalContent === 'user'}
|
|
||||||
onCancel={() => setModalContent(null)}
|
|
||||||
notificationData={notification}
|
|
||||||
/>
|
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user