Skip to content

Commit

Permalink
Fix down arrow showing when not scrollable
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIPv4 committed Mar 6, 2025
1 parent 0775c2f commit f9c7742
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages/overlay/components/overlay/Ambassadors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,15 @@ export default function Ambassadors(props: AmbassadorsProps) {
if (ambassadorList.current) {
if (ambassadorList.current.scrollTop === 0)
upArrowRef.current?.classList.add(...hiddenClass.split(" "));
else if (
else upArrowRef.current?.classList.remove(...hiddenClass.split(" "));

if (
ambassadorList.current.scrollTop +
ambassadorList.current.clientHeight ===
ambassadorList.current.clientHeight >=
ambassadorList.current.scrollHeight
)
downArrowRef.current?.classList.add(...hiddenClass.split(" "));
else {
upArrowRef.current?.classList.remove(...hiddenClass.split(" "));
downArrowRef.current?.classList.remove(...hiddenClass.split(" "));
}
else downArrowRef.current?.classList.remove(...hiddenClass.split(" "));
}
}, []);

Expand Down

0 comments on commit f9c7742

Please sign in to comment.