Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/src/music/views/MusicLabView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from '@cdo/apps/lab2/projects/utils';
import {isProjectTemplateLevel} from '@cdo/apps/lab2/redux/lab2ReduxSelectors';
import {Channel, LevelProperties, ProjectSources} from '@cdo/apps/lab2/types';
import TeacherViewingStudentProjectAlert from '@cdo/apps/lab2/views/alerts/teacherViewingStudentProject';
import CodeEditor from '@cdo/apps/lab2/views/components/editor/CodeEditor';
import GuideInstructions from '@cdo/apps/lab2/views/components/guide/GuideInstructions';
import ResourcePanel from '@cdo/apps/lab2/views/components/Instructions/ResourcePanel';
Expand Down Expand Up @@ -160,6 +161,9 @@ const MusicLabView: React.FunctionComponent<MusicLabViewProps> = ({
state => state.lab2View.isStandaloneCollapsed
);
const timelineAreaRef = useRef<HTMLDivElement | null>(null);
const teacherViewingStudent = Boolean(
useAppSelector(state => state.progress.viewAsUserId)
);

// Pass music validator to Progress Manager
useEffect(() => {
Expand Down Expand Up @@ -422,6 +426,9 @@ const MusicLabView: React.FunctionComponent<MusicLabViewProps> = ({
}
headerClassName={moduleStyles.headerWithBorder}
>
{teacherViewingStudent && (
<TeacherViewingStudentProjectAlert inWorkspaceContainer />
)}
{viewingOldVersion && (
<div
id="viewingOldVersionBanner"
Expand Down