Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Add comments about local imports
Browse files Browse the repository at this point in the history
  • Loading branch information
opr committed Oct 19, 2023
1 parent 1452447 commit ff813f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/base/components/load-more-button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { MouseEventHandler } from 'react';
* Internal dependencies
*/
import './style.scss';
import Label from '../../../../../packages/components/label';
import Label from '../../../../../packages/components/label'; // Imported like this because importing from the components package loads the data stores unnecessarily - not a problem in the front end but would require a lot of unit test rewrites to prevent breaking tests due to incorrect mocks.

interface LoadMoreButtonProps {
onClick: MouseEventHandler;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/base/components/sort-select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { ChangeEventHandler } from 'react';
* Internal dependencies
*/
import './style.scss';
import Label from '../../../../../packages/components/label';
import Label from '../../../../../packages/components/label'; // Imported like this because importing from the components package loads the data stores unnecessarily - not a problem in the front end but would require a lot of unit test rewrites to prevent breaking tests due to incorrect mocks.

interface SortSelectProps {
/**
Expand Down

0 comments on commit ff813f3

Please sign in to comment.