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

Commit 8d9a9a3

Browse files
addressed review comments
1 parent 93a6a8d commit 8d9a9a3

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

assets/js/blocks/reviews/reviews-by-product/no-reviews-placeholder.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
*/
44
import { __, sprintf } from '@wordpress/i18n';
55
import { Placeholder, Spinner } from '@wordpress/components';
6-
import ErrorPlaceholder, {
7-
ErrorObject,
8-
} from '@woocommerce/editor-components/error-placeholder';
6+
import ErrorPlaceholder from '@woocommerce/editor-components/error-placeholder';
97
import { Icon, commentContent } from '@wordpress/icons';
108
import { withProduct } from '@woocommerce/block-hocs';
119
import { decodeEntities } from '@wordpress/html-entities';
@@ -23,8 +21,8 @@ const NoReviewsPlaceholder = ( {
2321
const renderApiError = () => (
2422
<ErrorPlaceholder
2523
className="wc-block-featured-product-error"
26-
error={ error as ErrorObject }
27-
isLoading={ isLoading as boolean }
24+
error={ error }
25+
isLoading={ isLoading }
2826
onRetry={ getProduct }
2927
/>
3028
);

assets/js/blocks/reviews/reviews-by-product/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export interface SearchListItemProps extends renderItemArgs {
2626
}
2727

2828
export interface NoReviewsPlaceholderProps {
29-
error?: string | ErrorObject;
29+
error: ErrorObject;
3030
getProduct: () => void;
31-
isLoading?: boolean;
31+
isLoading: boolean;
3232
product?: {
3333
name: string;
3434
};

0 commit comments

Comments
 (0)