diff --git a/api/ssr.mjs b/api/ssr.mjs index 051d583d..6e0c7e21 100644 --- a/api/ssr.mjs +++ b/api/ssr.mjs @@ -1,8 +1,8 @@ import { renderPage } from 'vike/server' -// export const config = { -// runtime: 'edge' -// } +export const config = { + runtime: 'edge' +} export default async function handler(req, res) { const { url, cookies } = req diff --git a/src/components/_shared/SolidSwiper/ArticleCardSwiper.tsx b/src/components/_shared/SolidSwiper/ArticleCardSwiper.tsx index bbfec7a1..82dd8492 100644 --- a/src/components/_shared/SolidSwiper/ArticleCardSwiper.tsx +++ b/src/components/_shared/SolidSwiper/ArticleCardSwiper.tsx @@ -1,6 +1,6 @@ -import { createSignal, For, Show } from 'solid-js' +import { For, Show } from 'solid-js' import { Icon } from '../Icon' -import { register } from 'swiper/element/bundle' +import { register } from 'swiper/element' import SwiperCore, { Manipulation, Navigation, Pagination } from 'swiper' import { SwiperRef } from './swiper' import { clsx } from 'clsx' @@ -18,14 +18,8 @@ register() SwiperCore.use([Pagination, Navigation, Manipulation]) export const ArticleCardSwiper = (props: Props) => { - const [slideIndex, setSlideIndex] = createSignal(0) - const mainSwipeRef: { current: SwiperRef } = { current: null } - const handleSlideChange = () => { - setSlideIndex(mainSwipeRef.current.swiper.activeIndex) - } - return (