Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frontend-MECRED
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MECRED
Frontend-MECRED
Commits
bcaec708
Commit
bcaec708
authored
2 weeks ago
by
Richard Fernando Heise Ferreira
Browse files
Options
Downloads
Plain Diff
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
!303
Issue #312: FIX Slides scroll on the about page
Pipeline
#42432
passed
2 weeks ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/components/About.js
+2
-19
2 additions, 19 deletions
src/app/components/About.js
with
2 additions
and
19 deletions
src/app/components/About.js
+
2
−
19
View file @
bcaec708
...
...
@@ -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?
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment