Skip to content

Commit

Permalink
Remove unused component props
Browse files Browse the repository at this point in the history
warnings given by react/no-unused-prop-types when compiling prod
  • Loading branch information
alastair committed Oct 11, 2021
1 parent bad79b2 commit 3e8df8b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 0 additions & 4 deletions webserver/static/scripts/datasets/class-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const SECTION_CLASS_DETAILS = "class_details";
interface ClassProps {
id: number;
name: string | JSX.Element;
description: string;
recordingCounter: number;
onViewClass: (cls: number) => void;
}
Expand Down Expand Up @@ -55,7 +54,6 @@ function ClassList(props: ClassListProps) {
id={index}
key={index} // eslint-disable-line react/no-array-index-key
name={cls.name}
description={cls.description}
recordingCounter={cls.recordings.length}
onViewClass={props.onViewClass}
/>
Expand Down Expand Up @@ -182,7 +180,6 @@ function RecordingList(props: RecordingListProps) {

interface ClassDetailsProps {
datasetId: string;
id: number;
name: string;
description: string;
recordings: string[];
Expand Down Expand Up @@ -296,7 +293,6 @@ class Dataset extends Component<DatasetProps, DatasetState> {
return (
<ClassDetails
datasetId={this.props.datasetId}
id={this.state.active_class_index}
name={active_class.name}
description={active_class.description}
recordings={active_class.recordings}
Expand Down
2 changes: 0 additions & 2 deletions webserver/static/scripts/datasets/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ class DatasetControlButtons extends Component<
interface ClassProps {
id: number;
name: string | JSX.Element;
description: string;
recordingCounter: number;
onClassDelete: (index: number) => void;
onClassEdit: (index: number) => void;
Expand Down Expand Up @@ -223,7 +222,6 @@ function ClassList(props: ClassListProps) {
key={index} // eslint-disable-line react/no-array-index-key
id={index}
name={cls.name}
description={cls.description}
recordingCounter={cls.recordings.length}
onClassEdit={props.onClassEdit}
onClassDelete={props.onClassDelete}
Expand Down
6 changes: 2 additions & 4 deletions webserver/static/scripts/datasets/eval-jobs-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ interface JobRowProps {
id: string;
created: string;
status: string;
modelDownloadUrl?: string;
modelDownloadUrl: string | null;
outdated: string;
showDelete: boolean;
onViewDetails: (index: number) => void;
Expand Down Expand Up @@ -280,10 +280,9 @@ interface JobDetailsProps {
updated: string;
status: string;
outdated: string;
statusMsg?: string;
statusMsg: string | null;
result: any;
onReturn: () => void;
showDelete: boolean;
}

function JobDetails(props: JobDetailsProps) {
Expand Down Expand Up @@ -527,7 +526,6 @@ class EvaluationJobsViewer extends Component<
status={active_job.status}
statusMsg={active_job.status_msg}
result={active_job.result}
showDelete={this.state.isAuthorViewing}
outdated={active_job.outdated}
onReturn={this.handleReturn}
/>
Expand Down
4 changes: 2 additions & 2 deletions webserver/static/scripts/similarity/eval-recording.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ interface EvalRecordingProps {
rec: any;
hideForm: any;
handleChange: any;
handleYoutubeChange: any;
similarYoutubeQuery: any;
// handleYoutubeChange: any;
// similarYoutubeQuery: any;
}

function EvalRecording(props: EvalRecordingProps) {
Expand Down

0 comments on commit 3e8df8b

Please sign in to comment.