Skip to content

Commit c31a04f

Browse files
committed
[C] Fix prop-type, attribute warnings
1 parent 521f4cc commit c31a04f

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

client/src/frontend/components/layout/Tabs/Panel/Panel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function Panel({ children, className, id }) {
1414
<Styled.Panel
1515
className={className}
1616
{...panelProps}
17-
inert={!visible}
17+
inert={!visible ? "" : undefined}
1818
$visible={visible}
1919
>
2020
{children}

client/src/frontend/components/resource-list/List/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ResourceList.propTypes = {
3333
resources: PropTypes.arrayOf(PropTypes.object),
3434
resourceCollection: PropTypes.object,
3535
project: PropTypes.object,
36-
active: PropTypes.bool,
36+
active: PropTypes.string,
3737
setActive: PropTypes.func,
3838
itemHeadingLevel: PropTypes.oneOf([2, 3]),
3939
renderAsLink: PropTypes.bool

client/src/reader/components/return-menu/Body/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ export default function ReturnMenuBody({
9494
ReturnMenuBody.displayName = "ReturnMenuBody";
9595

9696
ReturnMenuBody.propTypes = {
97-
returnUrl: PropTypes.string.isRequired,
98-
projectTitle: PropTypes.string.isRequired,
97+
returnUrl: PropTypes.string,
98+
projectTitle: PropTypes.string,
9999
toggleSignInUpOverlay: PropTypes.func.isRequired,
100100
moreLink: PropTypes.string,
101101
settings: PropTypes.object,

client/src/reader/containers/Annotatable/Drawer/types/ViewAnnotations.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useMemo } from "react";
22
import PropTypes from "prop-types";
3+
import { useDispatch } from "react-redux";
34
import { useFetch } from "hooks";
45
import { annotationsAPI, requests } from "api";
56
import Annotation from "global/components/Annotation";
@@ -26,6 +27,8 @@ export default function ViewAnnotations({
2627
options: { requestKey: requests.rDrawerAnnotations }
2728
});
2829

30+
const dispatch = useDispatch();
31+
2932
const saveAnnotation = (model, group) => {
3033
const attributes = { ...group.selection, ...model.attributes };
3134
const newModel = { ...model, attributes };
@@ -39,6 +42,7 @@ export default function ViewAnnotations({
3942
loginHandler={actions.showLogin}
4043
focusHandler={actions.focusHandler}
4144
closeDrawer={closeDrawer}
45+
dispatch={dispatch}
4246
/>
4347
);
4448
}

0 commit comments

Comments
 (0)