fix: always show scroll indicator

This commit is contained in:
zhom
2025-11-26 01:42:52 +04:00
parent c7c910d1ca
commit 18bfb1ed5b
+17
View File
@@ -116,6 +116,23 @@ export function GroupBadges({
};
}, [checkScrollPosition]);
useEffect(() => {
if (groups.length === 0) {
setShowLeftFade(false);
setShowRightFade(false);
return;
}
const container = scrollContainerRef.current;
if (!container) return;
requestAnimationFrame(() => {
requestAnimationFrame(() => {
checkScrollPosition();
});
});
}, [groups, checkScrollPosition]);
if (isLoading && !groups.length) {
return (
<div className="flex gap-2 mb-4">