diff --git a/src/components/sections/upcoming_events.jsx b/src/components/sections/upcoming_events.jsx index 607e07b..1a7f3ce 100644 --- a/src/components/sections/upcoming_events.jsx +++ b/src/components/sections/upcoming_events.jsx @@ -1,31 +1,17 @@ import React from "react"; -import usePaging from "../../hooks/usePaging"; -import useWindowDimensions from "../../hooks/useWindowDimensions"; -import { motion } from "framer-motion"; + // Translations import i18n from "../../i18n/index.js"; import upcomingEvents from "../../data/upcoming_events.json"; -//Icons -import Icon from "@mdi/react"; -import { mdiChevronLeft, mdiChevronRight } from "@mdi/js"; // Components const Section = React.lazy(() => import("../section")); const LinkButton = React.lazy(() => import("../link_button")); -// Below screen 800px, this is the width -const baseCardWidth = 335; - function UpcomingEvents() { - // As cards are dynamic in width, the width for the hook needs to adapt - // At 800px cards stop getting smaller, 335px is the limit - const { width } = useWindowDimensions(); - // Define the limit using the padding - const cardWidth = width >= 800 ? (width - 100) / 2 : baseCardWidth; - const [page, handleLeftClick, handleRightClick, pageLimit, limitLeft] = - usePaging(cardWidth, upcomingEvents, 1); + return (
@@ -68,33 +55,6 @@ function UpcomingEvents() { ); })} - - {/*
- - -
*/}
); }