mirror of
https://github.com/cgzirim/seek-tune.git
synced 2025-12-17 08:54:19 +00:00
Add smooth scrolling to YouTube cards when circle is clicked
This commit is contained in:
parent
46e2a87e76
commit
7c784d6384
1 changed files with 5 additions and 1 deletions
|
|
@ -72,7 +72,11 @@ const CarouselSliders = (props) => {
|
|||
: `${styles.Link} ${styles.ActiveLink}`
|
||||
}
|
||||
href={`#slide-${match.YouTubeID}`}
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
document
|
||||
.getElementById(`slide-${match.YouTubeID}`)
|
||||
.scrollIntoView({ behavior: "smooth" });
|
||||
setActiveVideoID(match.YouTubeID);
|
||||
}}
|
||||
></a>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue