Skip to content
Snippets Groups Projects
Commit bcaec708 authored by Richard Fernando Heise Ferreira's avatar Richard Fernando Heise Ferreira
Browse files

Merge branch 'issue-312/fix-slide-scroll-on-the-about-page' into 'develop'

Issue #312: FIX Slides scroll on the about page

See merge request !303
parents a58d5e7d 9b90a07d
No related branches found
No related tags found
1 merge request!303Issue #312: FIX Slides scroll on the about page
Pipeline #42432 passed
......@@ -373,27 +373,10 @@ export default function AboutComponent() {
};
const Slides = () => {
const slidesRef = useRef(null);
useEffect(() => {
const handleWheel = (e) => {
if (e.deltaY !== 0) {
slidesRef.current.scrollLeft += e.deltaY*2; // Usa o scroll para horizontal
e.preventDefault(); // Impede o comportamento padrão
}
};
const slidesContainer = slidesRef.current;
slidesContainer.addEventListener("wheel", handleWheel); // O evento wheel dispara quando o usuário gira o scroll do mouse
// Limpeza do evento
return () => slidesContainer.removeEventListener("wheel", handleWheel);
}, []);
return (
<>
<div className="w-full px-1 xl:grid xl:grid-rows-1 xl:grid-flow-col gap-4 justify-between mb-10 pb-2 flex flex-nowrap overflow-x-auto scrollbar-none max-xl:animate-scrollHint scroll-smooth"
ref={slidesRef}
>
<div className="w-full px-1 xl:grid xl:grid-rows-1 xl:grid-flow-col gap-4 justify-between mb-10 pb-2
flex flex-nowrap overflow-x-auto scroll-smooth max-xl:animate-scrollHint">
<SlideInfo
name="Professores"
description="Como publicar um recurso?"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment