From 9b6bb76be96c527846042e983b31325b10bcab17 Mon Sep 17 00:00:00 2001 From: devartes Date: Mon, 23 Jan 2023 17:43:53 -0300 Subject: [PATCH] refactor(swiper): removendo SwiperComponent , substituindo por recurso da vtex --- react/SwiperComponent.tsx | 3 --- .../SwiperComponent/SwiperComponent.tsx | 21 ------------------- store/blocks/pdp/product.jsonc | 4 ++-- store/interfaces.json | 3 --- 4 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 react/SwiperComponent.tsx delete mode 100644 react/components/SwiperComponent/SwiperComponent.tsx diff --git a/react/SwiperComponent.tsx b/react/SwiperComponent.tsx deleted file mode 100644 index 09a0c48..0000000 --- a/react/SwiperComponent.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import Swiper from "./components/SwiperComponent/SwiperComponent"; - -export default Swiper; diff --git a/react/components/SwiperComponent/SwiperComponent.tsx b/react/components/SwiperComponent/SwiperComponent.tsx deleted file mode 100644 index 782fe36..0000000 --- a/react/components/SwiperComponent/SwiperComponent.tsx +++ /dev/null @@ -1,21 +0,0 @@ -const Swiper = () => { - if (typeof document !== "undefined") { - const SwiperContainer = document.querySelector(".swiper-container"); - const SwiperWrapper = document.querySelector(".swiper-wrapper"); - if (SwiperContainer) { - SwiperContainer.classList.remove("swiper-container-vertical"); - SwiperContainer.classList.add("swiper-container-horizontal"); - SwiperContainer.classList.add( - "vtex-store-components-3-x-swiper-component" - ); - } - if (SwiperWrapper) { - SwiperWrapper.classList.add( - "vtex-store-components-3-x-swiper-wrapper-style" - ); - } - } - return null; -}; - -export default Swiper; diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc index f26aa5d..f7d6e5f 100644 --- a/store/blocks/pdp/product.jsonc +++ b/store/blocks/pdp/product.jsonc @@ -3,7 +3,6 @@ "children": [ "html#breadcrumb", "condition-layout.product#availability", - "swiper-component", "flex-layout.row#description", "flex-layout.row#specifications-title", "product-specification-group#table", @@ -92,7 +91,8 @@ "phone": "16:9" }, "displayThumbnailsArrows": false, - "showPaginationDots": false + "showPaginationDots": false, + "thumbnailsOrientation": "horizontal" } }, "flex-layout.col#right-col": { diff --git a/store/interfaces.json b/store/interfaces.json index 6956375..c4b2ac4 100644 --- a/store/interfaces.json +++ b/store/interfaces.json @@ -5,8 +5,5 @@ "html": { "component": "html", "composition": "children" - }, - "swiper-component": { - "component": "SwiperComponent" } }