Skip to content

Commit

Permalink
fix: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Dec 7, 2023
1 parent 58964a2 commit 1f52c40
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/taxonomy/import-tags/data/api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ describe('import taxonomy api calls', () => {

it('should call import tags', async () => {
axiosMock.onPut(getTagsImportApiUrl(1)).reply(200, tagImportMock);
useMutation.mockReturnValue({
mutate: jest.fn(),
});
const mutation = useImportTags();
mutation.mutate(1);

Expand Down
2 changes: 1 addition & 1 deletion src/taxonomy/taxonomy-card/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const TaxonomyCard = ({ className, original }) => {
} = original;

const intl = useIntl();

const getHeaderActions = () => (
<TaxonomyMenu
taxonomy={original}
Expand Down
27 changes: 19 additions & 8 deletions src/taxonomy/taxonomy-menu/TaxonomyMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,24 @@ const TaxonomyMenu = ({

const menuItems = getTaxonomyMenuItems();

const renderModals = () => isExportModalOpen && (
<ExportModal
isOpen={isExportModalOpen}
onClose={exportModalClose}
taxonomyId={taxonomy.id}
taxonomyName={taxonomy.name}
/>
const renderModals = () => (
<>
{isExportModalOpen && (
<ExportModal
taxonomyId={taxonomy.id}
isOpen={isExportModalOpen}
onClose={exportModalClose}
taxonomyName={taxonomy.name}
/>
)}
{isImportModalOpen && (
<ImportTagsWizard
taxonomy={taxonomy}
isOpen={isImportModalOpen}
close={importModalClose}
/>
)}
</>
);

return (
Expand Down Expand Up @@ -98,4 +109,4 @@ TaxonomyMenu.propTypes = {
iconMenu: PropTypes.bool.isRequired,
};

export default TaxonomyMenu;
export default TaxonomyMenu;
2 changes: 1 addition & 1 deletion src/taxonomy/taxonomy-menu/TaxonomyMenu.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ describe('<TaxonomyMenu />', async () => {
expect(getTaxonomyExportFile).toHaveBeenCalledWith(taxonomyId, 'json');
});
});
});
});

0 comments on commit 1f52c40

Please sign in to comment.