-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable modal types #1 of 2 #1189
Conversation
Signed-off-by: Ib Green <[email protected]>
<div className="description" /> | ||
<div className="selection"> | ||
<FormattedMessage id={'modal.exportMap.html.selection'} /> | ||
const ExportHtmlMapUnmemoized = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code not changed, just broken out.
@@ -44,65 +44,76 @@ const NO_OP = () => {}; | |||
ExportMapModalFactory.deps = [ExportHtmlMapFactory, ExportJsonMapFactory]; | |||
|
|||
function ExportMapModalFactory(ExportHtmlMap, ExportJsonMap) { | |||
const ExportMapModal = React.memo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code not changed, just broken out.
@@ -67,8 +67,26 @@ const StyledImagePreview = styled.div.attrs({ | |||
} | |||
`; | |||
|
|||
const ImagePreview = ({exportImage = {}, width = 400, showDimension}) => { | |||
const {error, imageDataUri, exporting, imageSize: {imageW, imageH} = {}} = exportImage; | |||
/** @typedef {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExportImage
is defined in ui-state-updater.d.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Will update to use that in #1190
This gets type checking flowing through the big modal-container component all the way to
upload-file.js
.A few files look like they have big changes but I am just splitting out unmemoized components from memoized ones to ensure typescript can infer the types automatically.