forum
This commit is contained in:
@@ -175,7 +175,8 @@ const CreateTopicModal = ({ visible, onClose, onSuccess, initialValues, isEditMo
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
width={1000}
|
||||
style={{ top: 20 }}
|
||||
centered
|
||||
maskClosable={false}
|
||||
>
|
||||
<Form
|
||||
form={form}
|
||||
|
||||
@@ -65,6 +65,7 @@ const LoginModal = ({ visible, onClose, onLoginSuccess }) => {
|
||||
onCancel={onClose}
|
||||
footer={null}
|
||||
destroyOnClose
|
||||
centered
|
||||
>
|
||||
<Form
|
||||
form={form}
|
||||
|
||||
@@ -194,7 +194,7 @@ const ForumDetail = () => {
|
||||
backdropFilter: 'blur(10px)',
|
||||
marginBottom: 30
|
||||
}}
|
||||
bodyStyle={{ padding: '30px' }}
|
||||
styles={{ body: { padding: '30px' } }}
|
||||
>
|
||||
<div style={{ marginBottom: 20 }}>
|
||||
{topic.is_pinned && <Tag color="red" style={{ marginRight: 10 }}>置顶</Tag>}
|
||||
@@ -353,11 +353,13 @@ const ForumDetail = () => {
|
||||
{/* Edit Modal */}
|
||||
<CreateTopicModal
|
||||
visible={editModalVisible}
|
||||
onClose={() => setEditModalVisible(false)}
|
||||
onClose={() => {
|
||||
setEditModalVisible(false);
|
||||
// Workaround for scroll issue: Force reload page on close
|
||||
window.location.reload();
|
||||
}}
|
||||
onSuccess={() => {
|
||||
fetchTopic();
|
||||
// setEditModalVisible(false) is called in modal's submit handler wrapper?
|
||||
// CreateTopicModal calls onSuccess then onClose. So we just need to refresh here.
|
||||
}}
|
||||
initialValues={topic}
|
||||
isEditMode={true}
|
||||
|
||||
Reference in New Issue
Block a user