Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… Fixed console error with attribute name in lowercase. (#3942)

Co-authored-by: Namrata Sangani <[email protected]>
Co-authored-by: Devagouda <[email protected]>
  • Loading branch information
3 people authored Sep 30, 2022
1 parent 731d9ac commit 78d7452
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useStyle } from '../../classify';
import defaultClasses from './categoryBranch.module.css';

const Branch = props => {
const { category, setCategoryId, tabindex } = props;
const { category, setCategoryId, tabIndex } = props;
const { name } = category;
const classes = useStyle(defaultClasses, props.classes);

Expand All @@ -20,7 +20,7 @@ const Branch = props => {
return (
<li className={classes.root}>
<button
tabindex={tabindex}
tabIndex={tabIndex}
className={classes.target}
data-cy="CategoryTree-Branch-target"
type="button"
Expand All @@ -46,5 +46,5 @@ Branch.propTypes = {
text: string
}),
setCategoryId: func.isRequired,
tabindex: func.isRequired
tabIndex: func.isRequired
};
6 changes: 3 additions & 3 deletions packages/venia-ui/lib/components/CategoryTree/categoryLeaf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useStyle } from '../../classify';
import defaultClasses from './categoryLeaf.module.css';

const Leaf = props => {
const { category, onNavigate, categoryUrlSuffix, tabindex } = props;
const { category, onNavigate, categoryUrlSuffix, tabIndex } = props;
const { name, url_path, children } = category;
const classes = useStyle(defaultClasses, props.classes);
const { handleClick } = useCategoryLeaf({ onNavigate });
Expand All @@ -35,7 +35,7 @@ const Leaf = props => {
data-cy="CategoryTree-Leaf-target"
to={destination}
onClick={handleClick}
tabIndex={tabindex}
tabIndex={tabIndex}
>
<span className={classes.text}>{leafLabel}</span>
</Link>
Expand All @@ -56,6 +56,6 @@ Leaf.propTypes = {
text: string
}),
onNavigate: func.isRequired,
tabindex: func.isRequired,
tabIndex: func.isRequired,
categoryUrlSuffix: string
};
8 changes: 4 additions & 4 deletions packages/venia-ui/lib/components/CategoryTree/categoryTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Tree = props => {
onNavigate,
setCategoryId,
updateCategories,
tabindex
tabIndex
} = props;

const talonProps = useCategoryTree({
Expand All @@ -35,14 +35,14 @@ const Tree = props => {
category={category}
onNavigate={onNavigate}
categoryUrlSuffix={categoryUrlSuffix}
tabindex={tabindex}
tabIndex={tabIndex}
/>
) : (
<Branch
key={id}
category={category}
setCategoryId={setCategoryId}
tabindex={tabindex}
tabIndex={tabIndex}
/>
);
})
Expand All @@ -66,5 +66,5 @@ Tree.propTypes = {
onNavigate: func.isRequired,
setCategoryId: func.isRequired,
updateCategories: func.isRequired,
tabindex: func.isRequired
tabIndex: func.isRequired
};
4 changes: 2 additions & 2 deletions packages/venia-ui/lib/components/Navigation/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Navigation = props => {
const rootClassName = isOpen ? classes.root_open : classes.root;
const modalClassName = hasModal ? classes.modal_open : classes.modal;
const bodyClassName = hasModal ? classes.body_masked : classes.body;
const tabindex = isOpen ? '0' : '-1';
const tabIndex = isOpen ? '0' : '-1';

// Lazy load the auth modal because it may not be needed.
const authModal = hasModal ? (
Expand Down Expand Up @@ -72,7 +72,7 @@ const Navigation = props => {
onNavigate={handleClose}
setCategoryId={setCategoryId}
updateCategories={catalogActions.updateCategories}
tabindex={tabindex}
tabIndex={tabIndex}
/>
</div>
<div className={classes.footer}>
Expand Down

0 comments on commit 78d7452

Please sign in to comment.