From 9423a889ba38a613a31bcfc4fd200fd8f83f9275 Mon Sep 17 00:00:00 2001 From: sundasnoreen12 <72802712+sundasnoreen12@users.noreply.github.com> Date: Fri, 5 Apr 2024 01:33:07 +0500 Subject: [PATCH] fix: fixed units overflow issue (#1343) * fix: fixed units overflow issue * refactor: refactor code for desktop and xl screen * refactor: fixed refactor issue --- .../sequence-navigation/SequenceNavigationTabs.jsx | 10 +++++++++- .../course/sequence/sequence-navigation/hooks.js | 6 ++++++ src/index.scss | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/courseware/course/sequence/sequence-navigation/SequenceNavigationTabs.jsx b/src/courseware/course/sequence/sequence-navigation/SequenceNavigationTabs.jsx index 6e1e84d6c5..009c03d6c0 100644 --- a/src/courseware/course/sequence/sequence-navigation/SequenceNavigationTabs.jsx +++ b/src/courseware/course/sequence/sequence-navigation/SequenceNavigationTabs.jsx @@ -1,9 +1,11 @@ import React from 'react'; import PropTypes from 'prop-types'; +import classNames from 'classnames'; import UnitButton from './UnitButton'; import SequenceNavigationDropdown from './SequenceNavigationDropdown'; import useIndexOfLastVisibleChild from '../../../../generic/tabs/useIndexOfLastVisibleChild'; +import { useIsOnXLDesktop } from './hooks'; const SequenceNavigationTabs = ({ unitIds, unitId, showCompletion, onNavigate, @@ -13,11 +15,17 @@ const SequenceNavigationTabs = ({ containerRef, invisibleStyle, ] = useIndexOfLastVisibleChild(); + const isOnXLDesktop = useIsOnXLDesktop(); const shouldDisplayDropdown = indexOfLastVisibleChild === -1; return (