Page MenuHomePhorge

D3243.1768494463.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D3243.1768494463.diff

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

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)

Event Timeline