diff --git a/src/features/Dashboard/InstructorAssignSection/ClassCard.jsx b/src/features/Dashboard/InstructorAssignSection/ClassCard.jsx index 04a2fd3..ea82824 100644 --- a/src/features/Dashboard/InstructorAssignSection/ClassCard.jsx +++ b/src/features/Dashboard/InstructorAssignSection/ClassCard.jsx @@ -7,7 +7,8 @@ import { Button } from 'react-paragon-topaz'; import { formatDateRange } from 'helpers'; import { useInstitutionIdQueryParam } from 'hooks'; -import ToolTip from 'features/Dashboard/InstructorAssignSection/ToolTip'; +import EllipsisText from 'features/Dashboard/InstructorAssignSection/EllipsisText'; +import { textLength } from 'features/constants'; import 'features/Dashboard/InstructorAssignSection/index.scss'; @@ -19,19 +20,16 @@ const ClassCard = ({ data }) => { history.push(addQueryParam(`/manage-instructors/${encodeURIComponent(data?.masterCourseId)}/${encodeURIComponent(data?.classId)}?previous=dashboard`)); }; - const classElement = 'className'; - const courseElement = 'courseName'; - return (
{data?.masterCourseName}
)} diff --git a/src/features/Dashboard/InstructorAssignSection/ToolTip.jsx b/src/features/Dashboard/InstructorAssignSection/EllipsisText.jsx similarity index 62% rename from src/features/Dashboard/InstructorAssignSection/ToolTip.jsx rename to src/features/Dashboard/InstructorAssignSection/EllipsisText.jsx index 398db9c..204407d 100644 --- a/src/features/Dashboard/InstructorAssignSection/ToolTip.jsx +++ b/src/features/Dashboard/InstructorAssignSection/EllipsisText.jsx @@ -1,7 +1,9 @@ import PropTypes from 'prop-types'; import { Tooltip, OverlayTrigger } from '@edx/paragon'; -const ToolTip = ({ title, type }) => ( +import { textLength } from 'features/constants'; + +const EllipsisText = ({ title, type }) => ({title.substring(0, 20)}...
+{title.substring(0, textLength)}...
)}