Skip to content
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

Remove react-intl to fix crash in Zotero 6.0.22 #242

Merged
merged 1 commit into from
Mar 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"quickstatements-to-wikibase-edit": "^1.0.3",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-intl": "^5.10.13",
"wikibase-edit": "^4.11.8",
"wikibase-sdk": "^7.8.0"
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/button.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Button as ZoteroButton } from 'zotero@components/button';
import { injectIntl } from 'react-intl';

export let Button = injectIntl(ZoteroButton.WrappedComponent);
export let Button = ZoteroButton;
35 changes: 8 additions & 27 deletions src/components/itemPane/citationsBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import React, {
import Wikicite, { debug } from '../../wikicite';
import { Button } from '../button';
import Citation from '../../citation';
import { IntlProvider } from 'react-intl';
import PIDRow from '../pidRow';
import PropTypes from 'prop-types';
import SourceItemWrapper from '../../sourceItemWrapper';
Expand Down Expand Up @@ -336,32 +335,14 @@ function CitationsBox(props) {
</button>
</div>
}
<IntlProvider
locale={Zotero.locale}
// Fixme: improve messages object
messages={{
'wikicite.citations-pane.more': Wikicite.getString(
'wikicite.citations-pane.more'
)
}}
>
<Button
/*icon={
<span>
<img
height="16px"
src="chrome://cita/skin/wikicite.png"
/>
</span>
}*/
className="citations-box-actions"
isMenu={true}
onClick={props.onItemPopup}
text="wikicite.citations-pane.more"
title=""
size="sm"
/>
</IntlProvider>
<Button
className="citations-box-actions"
isMenu={true}
onClick={props.onItemPopup}
text={Wikicite.getString('wikicite.citations-pane.more')}
title=""
size="sm"
/>
</div>
<div className="citations-box-list-container">
<ul className="citations-box-list">
Expand Down
1 change: 0 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ module.exports = {
'zotero@components/button': 'commonjs components/button',
'zotero@components/editable': 'commonjs components/editable',
'zotero@components/form/input': 'commonjs components/form/input',
'zotero@react-intl': 'commonjs react-intl',
'zotero@zotero/filePicker': 'commonjs zotero/filePicker',
'zotero@zotero/modules/filePicker': 'commonjs zotero/modules/filePicker', // support Zotero af597d9
'zotero@zotero/itemTree': 'commonjs zotero/itemTree'
Expand Down