Skip to content

Commit 0abc0f3

Browse files
authored
[fix] Fix linting warnings (#50)
* fixed SingleTargetOverviewe link * cleaned linting warnings
1 parent b924fa4 commit 0abc0f3

File tree

19 files changed

+49
-570
lines changed

19 files changed

+49
-570
lines changed

src/Components/Content/Content.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import SingleStudentMasteryOverview from '../SingleStudentMasteryOverview/Single
99
import CourseHome from '../CourseHome/CourseHome';
1010
import SingleTargetOverview from '../SingleTargetOverview/SingleTargetOverview';
1111
import SingleMissionOverview from '../SingleStudentOverview/SingleMissionOverview';
12-
1312
import TaskView from '../../Screens/TaskView/TaskView';
1413
import TaskListView from '../TaskListView';
1514
import TaskSubmissionSummaryView from '../TaskSubmissionSummaryView';

src/Components/CourseHome/ListView.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import { CmStudentFieldsFragment } from '../../__generated__/types';
1616
interface MissionMasteryRow {
1717
row: {
1818
name: string;
19+
firstName: string;
20+
lastName: string;
1921
recent: string;
2022
masteryLevel: string;
2123
lastLogOn: string;
@@ -29,14 +31,21 @@ function ListView(classMissionMasterydata: any) {
2931
console.log(row);
3032
history.push({
3133
pathname: `/singleStudentOverview/${row.row.studentId}`,
34+
state: { id: row.row.studentId, firstName: row.row.firstName, lastName: row.row.lastName },
3235
});
3336
};
3437

3538
const data: MissionMasteryRow[] = classMissionMasterydata.classMissionMasterydata.studentMissionMasteryList.map(
3639
(studentMissionMastery: CmStudentFieldsFragment) => {
40+
const firstName = studentMissionMastery.student.firstName || 'Mary';
41+
const lastName = studentMissionMastery.student.lastName || 'Lee';
42+
const name = `${firstName} ${lastName}`;
43+
3744
return {
3845
row: {
39-
name: `${studentMissionMastery.student.lastName} ${studentMissionMastery.student.firstName}`,
46+
name,
47+
firstName,
48+
lastName,
4049
recent: studentMissionMastery.currentTaskName,
4150
masteryLevel: studentMissionMastery.level,
4251
lastLogOn: 'Jan. 7, 2021',

src/Components/LinearProgressWithLabel/LinearProgressWithLabel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-disable react/destructuring-assignment */
22
import { Box, LinearProgress, LinearProgressProps, Typography } from '@material-ui/core';
3-
import { createStyles, withStyles, Theme } from '@material-ui/core/styles';
3+
import { createStyles, withStyles } from '@material-ui/core/styles';
44

5-
const BorderLinearProgress = withStyles((theme: Theme) =>
5+
const BorderLinearProgress = withStyles(() =>
66
createStyles({
77
root: {
88
height: 20,

src/Components/LinearProgressWithLabel/ObjectiveDropDown.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ import ExpandLess from '@material-ui/icons/ExpandLess';
99
import ExpandMore from '@material-ui/icons/ExpandMore';
1010
import { Link } from 'react-router-dom';
1111
import { Box, LinearProgress } from '@material-ui/core';
12-
import LinearProgressWithLabel from './LinearProgressWithLabel';
13-
import {
14-
Task,
15-
TaskObjectiveProgress,
16-
TaskObjectiveProgressFieldsFragment,
17-
useGetTaskObjectiveProgressQuery,
18-
} from '../../__generated__/types';
12+
13+
import { TaskObjectiveProgress, useGetTaskObjectiveProgressQuery } from '../../__generated__/types';
1914

2015
const useStyles = makeStyles((theme: Theme) =>
2116
createStyles({
@@ -32,7 +27,7 @@ const useStyles = makeStyles((theme: Theme) =>
3227
},
3328
})
3429
);
35-
const MasteredProgress = withStyles((theme: Theme) =>
30+
const MasteredProgress = withStyles(() =>
3631
createStyles({
3732
root: {
3833
height: 25,
@@ -48,7 +43,7 @@ const MasteredProgress = withStyles((theme: Theme) =>
4843
})
4944
)(LinearProgress);
5045

51-
const NotStartedProgress = withStyles((theme: Theme) =>
46+
const NotStartedProgress = withStyles(() =>
5247
createStyles({
5348
root: {
5449
height: 25,
@@ -66,7 +61,7 @@ const NotStartedProgress = withStyles((theme: Theme) =>
6661
})
6762
)(LinearProgress);
6863

69-
const NotMasteredProgress = withStyles((theme: Theme) =>
64+
const NotMasteredProgress = withStyles(() =>
7065
createStyles({
7166
root: {
7267
height: 25,
@@ -82,7 +77,7 @@ const NotMasteredProgress = withStyles((theme: Theme) =>
8277
})
8378
)(LinearProgress);
8479

85-
const AlmostMasteredProgress = withStyles((theme: Theme) =>
80+
const AlmostMasteredProgress = withStyles(() =>
8681
createStyles({
8782
root: {
8883
height: 25,

0 commit comments

Comments
 (0)