From e46412f8106b2616431caa9ac688f7addff21dc6 Mon Sep 17 00:00:00 2001 From: "Jandir A. Cutabiala" Date: Mon, 14 Oct 2024 15:28:39 -0300 Subject: [PATCH] refactor: remove swiper core --- src/components/LatestPosts/index.tsx | 6 +----- src/components/Subscribe/index.tsx | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/LatestPosts/index.tsx b/src/components/LatestPosts/index.tsx index d15aa22..9bc5970 100644 --- a/src/components/LatestPosts/index.tsx +++ b/src/components/LatestPosts/index.tsx @@ -1,5 +1,4 @@ import * as React from "react"; -import SwiperCore from "swiper"; import { Navigation } from "swiper/modules"; import { Swiper, SwiperSlide } from "swiper/react"; import { graphql, Link, useStaticQuery } from "gatsby"; @@ -9,12 +8,8 @@ import { } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -// import "swiper/css"; - import ArticleCard from "../ArticleCard"; -SwiperCore.use([Navigation]); - export default function LatestPosts() { const data = useStaticQuery>(graphql` query { @@ -69,6 +64,7 @@ export default function LatestPosts() { prevEl: ".post-highlight-prev", }} centeredSlides={true} + modules={[Navigation]} > {data.allMdx.edges.map(({ node }, index) => ( +