Skip to content

Commit af40762

Browse files
committed
refactor: create renderers for each product type
- split root product page into a separate components - move styles to shared file - reduce the amount of unused code in different component types - add useGallery composable - add useProductTabs composable - add canAddToCart method on useCart composable
1 parent 99a945e commit af40762

File tree

20 files changed

+1544
-760
lines changed

20 files changed

+1544
-760
lines changed

packages/theme/components/__tests__/ProductAddReviewForm.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010

1111
import { useReview } from '~/composables';
1212
import { useUser } from '~/modules/customer/composables/useUser';
13-
import ProductAddReviewForm from '../ProductAddReviewForm';
13+
import ProductAddReviewForm from '../../modules/catalog/product/components/ProductAddReviewForm';
1414

1515
jest.mock('~/composables', () => {
1616
const originalModule = jest.requireActual('~/composables');

packages/theme/composables/useReview/useReview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Ref, DeepReadonly } from '@nuxtjs/composition-api';
1+
import type { Ref } from '@nuxtjs/composition-api';
22
import type { ComposableFunctionArgs } from '~/composables/types';
33
import type { GetProductSearchParams } from '~/modules/catalog/product/types';
44
import type {
@@ -96,5 +96,5 @@ export interface UseReviewInterface {
9696
/**
9797
* Contains errors from any of the composable methods
9898
*/
99-
error: DeepReadonly<Ref<UseReviewErrors>>;
99+
error: Readonly<Ref<UseReviewErrors>>;
100100
}

0 commit comments

Comments
 (0)