Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33124976
D3243.1768494463.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3243.1768494463.diff
View Options
diff --git a/web/calendar/entry.react.js b/web/calendar/entry.react.js
--- a/web/calendar/entry.react.js
+++ b/web/calendar/entry.react.js
@@ -388,10 +388,7 @@
this.clearModal();
};
this.props.setModal(
- <ConcurrentModificationModal
- onClose={this.clearModal}
- onRefresh={onRefresh}
- />,
+ <ConcurrentModificationModal onRefresh={onRefresh} />,
);
}
throw e;
diff --git a/web/modals/concurrent-modification-modal.react.js b/web/modals/concurrent-modification-modal.react.js
--- a/web/modals/concurrent-modification-modal.react.js
+++ b/web/modals/concurrent-modification-modal.react.js
@@ -1,18 +1,22 @@
// @flow
+import invariant from 'invariant';
import * as React from 'react';
import css from '../style.css';
+import { ModalContext } from './modal-provider.react';
import Modal from './modal.react';
type Props = {
+onRefresh: () => void,
- +onClose: () => void,
};
export default function ConcurrentModificationModal(props: Props): React.Node {
+ const modalContext = React.useContext(ModalContext);
+ invariant(modalContext, 'modalContext not set');
+
return (
- <Modal name="Concurrent modification" clearModal={props.onClose}>
+ <Modal name="Concurrent modification" clearModal={modalContext.clearModal}>
<div className={css['modal-body']}>
<p>
It looks like somebody is attempting to modify that field at the same
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 15, 4:27 PM (12 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5938828
Default Alt Text
D3243.1768494463.diff (1 KB)
Attached To
Mode
D3243: [web] [refactor] remove onClose prop drill from concurrent modal, replace with context
Attached
Detach File
Event Timeline
Log In to Comment