pull/5370/head
lianahus 2 years ago
parent 97931ebaff
commit bdcf65dd67
  1. 2
      libs/remix-ui/home-tab/src/lib/components/customNavButtons.tsx
  2. 11
      libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx
  3. 11
      libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx

@ -16,7 +16,7 @@ const CustomNavButtons = ({ next, previous, goToSlide, ...rest }) => {
className={
((totalItems - currentSlide) * itemWidth + 5) < containerWidth ? 'disable py-1 border btn' : 'py-1 border btn'}
onClick={() => {
if (currentSlide + 1 < totalItems) goToSlide(currentSlide + 1)
if (currentSlide + 1 < totalItems) goToSlide(currentSlide + 1)
}}
disabled ={((totalItems - currentSlide) * itemWidth + 5) < containerWidth}
>

@ -32,13 +32,14 @@ function HomeTabFeaturedPlugins ({plugin}: HomeTabFeaturedPluginsProps) {
function isDescendant(parent, child) {
let node = child.parentNode;
while (node != null) {
if (node === parent) {
return true;
}
node = node.parentNode;
if (node === parent) {
return true;
}
node = node.parentNode;
}
return false;
}
}
const handleScroll = (e) => {
if (isDescendant(carouselRefDiv.current, e.target)) {
e.stopPropagation()

@ -30,13 +30,14 @@ function HomeTabGetStarted ({plugin}: HomeTabGetStartedProps) {
function isDescendant(parent, child) {
let node = child.parentNode;
while (node != null) {
if (node === parent) {
return true;
}
node = node.parentNode;
if (node === parent) {
return true;
}
node = node.parentNode;
}
return false;
}
}
const handleScroll = (e) => {
if (isDescendant(carouselRefDiv.current, e.target)) {
e.stopPropagation()

Loading…
Cancel
Save