Skip to content

Commit b13b721

Browse files
Merge pull request #5088 from OneCommunityGlobal/fix/remove-scroll-up-button-events-page
Namitha: Hide scroll-up button on community portal events page
2 parents 9f1950b + df97efd commit b13b721

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/components/CommunityPortal/CPDashboard.jsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,20 @@ export function CPDashboard() {
6363
const [error, setError] = useState(null);
6464
const darkMode = useSelector(state => state.theme.darkMode);
6565

66+
// Hide the global back-to-top button — not needed on this page
67+
useEffect(() => {
68+
const scrollBtn = document.querySelector('.back-to-top');
69+
if (!scrollBtn) return;
70+
const prevDisplay = scrollBtn.style.display;
71+
scrollBtn.style.display = 'none';
72+
return () => {
73+
scrollBtn.style.display = prevDisplay;
74+
};
75+
}, []);
76+
6677
// Consolidated filter states
6778
const [pendingFilters, setPendingFilters] = useState(DEFAULT_FILTERS);
6879
const [appliedFilters, setAppliedFilters] = useState(DEFAULT_FILTERS);
69-
7080
const [pagination, setPagination] = useState({
7181
currentPage: 1,
7282
totalPages: 5,

0 commit comments

Comments
 (0)