Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
moshfeu committed Dec 14, 2018
1 parent 7d81a7a commit 62f2a76
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/about-modal/about-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface IAboutModalProps {
onClose: () => void;
}

export default class AboutModal extends React.Component<IAboutModalProps> {
export class AboutModal extends React.Component<IAboutModalProps> {
render() {
const { open, onClose } = this.props;
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/about-modal/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {default} from './about-modal';
export { AboutModal } from './about-modal';
2 changes: 1 addition & 1 deletion src/components/button-progress/button-progress.driver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { SinonSpy } from 'sinon';
import { shallow } from 'enzyme';
import BaseDriver from '../../../test/base.driver';
import ButtonProgress, { IButtonProgressProps } from './button-progress';
import { ButtonProgress, IButtonProgressProps } from './button-progress';

export default class ButtonProgressDriver extends BaseDriver {
private text: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/button-progress/button-progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface IButtonProgressState {
progress: number;
}

export default class ButtonProgress extends React.Component<IButtonProgressProps, IButtonProgressState> {
export class ButtonProgress extends React.Component<IButtonProgressProps, IButtonProgressState> {
private readonly progressDone = 100;

constructor(props) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/button-progress/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {default} from './button-progress';
export {ButtonProgress} from './button-progress';
7 changes: 4 additions & 3 deletions src/components/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { Video } from './video';
import { IVideoTask } from 'youtube-mp3-downloader';
import { isFFMpegInstalled } from '../services/ffmpeg-installer';
import { Form } from './form';
import ButtonProgress from './button-progress';
import { ButtonProgress } from './button-progress';
import { InstallFFMpeg } from './install-ffmpeg';
import { ipcRenderer } from '../services/electron-adapter';
import AboutModal from './about-modal';
import { AboutModal } from './about-modal';

interface IMainState {
videos: IVideoEntity[];
Expand Down Expand Up @@ -48,6 +48,7 @@ class Main extends React.Component<{}, IMainState> {
const videos = await fetchVideos(terms);
this.setState({videos, inProcess: false});
}

videoIndex = (videoId: string) => {
return this.state.videos.findIndex(v => v.id === videoId);
}
Expand Down Expand Up @@ -112,7 +113,7 @@ class Main extends React.Component<{}, IMainState> {
}
}

error = (err, data) => {
error = (err) => {
alert(err);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/video.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { IVideoEntity, EVideoStatus } from '../types';
import ButtonProgress from './button-progress';
import { ButtonProgress } from './button-progress';

interface IVideoProps {
style?: React.CSSProperties,
Expand Down

0 comments on commit 62f2a76

Please sign in to comment.