diff --git a/components/product/Gallery.tsx b/components/product/Gallery.tsx index a7f4b32..c74b2c5 100644 --- a/components/product/Gallery.tsx +++ b/components/product/Gallery.tsx @@ -74,20 +74,6 @@ export default function GallerySlider(props: Props) { ))} - - - - - - - -
+ {/* Dots */}
+ + + + + + + +
diff --git a/components/product/ProductInfo.tsx b/components/product/ProductInfo.tsx index b58027a..71e3f0c 100644 --- a/components/product/ProductInfo.tsx +++ b/components/product/ProductInfo.tsx @@ -89,7 +89,7 @@ function ProductInfo({ page, itemsShare }: Props) { REF: {productID} - + diff --git a/components/product/ProductReview/ReviewForm.tsx b/components/product/ProductReview/ReviewForm.tsx index 8a60ad5..ed8acef 100644 --- a/components/product/ProductReview/ReviewForm.tsx +++ b/components/product/ProductReview/ReviewForm.tsx @@ -1,11 +1,16 @@ +import { useDevice } from "@deco/deco/hooks"; import { AppContext } from "../../../apps/deco/wake.ts"; +import { clx } from "../../../sdk/clx.ts"; import { useComponent } from "../../../sections/Component.tsx"; +import ReviewRating from "../ReviewRating.tsx"; interface ReviewFormProps { productVariantId: number; state?: string; message?: string; + ratingValue?: number; + reviewCount?: number; } export const action = async ( @@ -19,6 +24,7 @@ export const action = async ( try { const formData = await req.formData(); + // deno-lint-ignore no-explicit-any await (ctx as any).invoke.wake.actions.review.create({ email, name: givenName, @@ -32,29 +38,58 @@ export const action = async ( } }; -export default function ReviewForm({ productVariantId, state, message }: ReviewFormProps) { - console.log(state, message) +export default function ReviewForm({ productVariantId, state, message, reviewCount, ratingValue }: ReviewFormProps) { + const device = useDevice() if (state && message) { return ( -

- {message} -

+

+ {message} +

); - } + } return ( -
- -
- - - - - -
- -
+
+ {device === "desktop" && ( + <> +
+

Avaliações de Clientes

+ +
+
+ + )} +
+
+ Adicionar avaliação +
+
+ + + + + +
+ Avalie o produto de 1 a 5 estrelas +
+
+