Browse Source

@uppy/screen-capture: fix TODOs (#3930)

- rename `RecorderScreen` class file to match with the class name.
- rename `Stopwatch` -> `StopWatch` (PascalCase convention).
Antoine du Hamel 2 years ago
parent
commit
386d72d9f4

+ 0 - 1
packages/@uppy/screen-capture/src/CaptureScreen.jsx → packages/@uppy/screen-capture/src/RecorderScreen.jsx

@@ -1,4 +1,3 @@
-// TODO: rename this file to RecorderScreen.jsx in the next major.
 /* eslint-disable react/jsx-props-no-spreading */
 import { h, Component } from 'preact'
 import RecordButton from './RecordButton.jsx'

+ 2 - 2
packages/@uppy/screen-capture/src/ScreenCapture.jsx

@@ -2,7 +2,7 @@ import { h } from 'preact'
 import { UIPlugin } from '@uppy/core'
 import getFileTypeExtension from '@uppy/utils/lib/getFileTypeExtension'
 import ScreenRecIcon from './ScreenRecIcon.jsx'
-import CaptureScreen from './CaptureScreen.jsx'
+import RecorderScreen from './RecorderScreen.jsx'
 
 import packageJson from '../package.json'
 import locale from './locale.js'
@@ -392,7 +392,7 @@ export default class ScreenCapture extends UIPlugin {
     }
 
     return (
-      <CaptureScreen
+      <RecorderScreen
         {...recorderState} // eslint-disable-line react/jsx-props-no-spreading
         onStartRecording={this.startRecording}
         onStopRecording={this.stopRecording}

+ 2 - 3
packages/@uppy/screen-capture/src/StopWatch.jsx

@@ -1,7 +1,6 @@
 import { h, Component } from 'preact'
 
-// TODO: rename this class to StopWatch in the next major.
-class Stopwatch extends Component {
+class StopWatch extends Component {
   constructor (props) {
     super(props)
     this.state = { elapsedTime: 0 }
@@ -105,4 +104,4 @@ class Stopwatch extends Component {
   }
 }
 
-export default Stopwatch
+export default StopWatch