From ff813f33c952212ee07d048ea76a41a4c974dd84 Mon Sep 17 00:00:00 2001 From: Thomas Roberts Date: Tue, 17 Oct 2023 15:21:15 +0100 Subject: [PATCH] Add comments about local imports --- assets/js/base/components/load-more-button/index.tsx | 2 +- assets/js/base/components/sort-select/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/base/components/load-more-button/index.tsx b/assets/js/base/components/load-more-button/index.tsx index da185a9d88d..d5d3f7b767d 100644 --- a/assets/js/base/components/load-more-button/index.tsx +++ b/assets/js/base/components/load-more-button/index.tsx @@ -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; diff --git a/assets/js/base/components/sort-select/index.tsx b/assets/js/base/components/sort-select/index.tsx index 2a5309fc4c5..f543b164d4c 100644 --- a/assets/js/base/components/sort-select/index.tsx +++ b/assets/js/base/components/sort-select/index.tsx @@ -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 { /**