diff --git a/src/components/App.js b/src/components/App.js
index 2bb955e..fbda4cd 100644
--- a/src/components/App.js
+++ b/src/components/App.js
@@ -24,7 +24,7 @@ export default class App extends React.Component {
SupportStore.listen(this._onChange)
}
- componentDidUnmount() {
+ componentWillUnmount() {
SupportStore.unlisten(this._onChange)
}
diff --git a/src/components/ChromeNotice.js b/src/components/ChromeNotice.js
index cc5fd66..4bd03ab 100644
--- a/src/components/ChromeNotice.js
+++ b/src/components/ChromeNotice.js
@@ -4,7 +4,7 @@ import SupportStore from '../stores/SupportStore'
function getState() {
return {
- active: SupportStore.getState().isChrome && DownloadStore.getState().fileSize >= 500000000
+ active: SupportStore.getState().isChrome && DownloadStore.getState().fileSize >= 500000000
}
}
@@ -24,7 +24,7 @@ export default class ChromeNotice extends React.Component {
SupportStore.listen(this._onChange)
}
- componentDidUnmount() {
+ componentWillUnmount() {
DownloadStore.unlisten(this._onChange)
SupportStore.unlisten(this._onChange)
}
diff --git a/src/components/DownloadButton.js b/src/components/DownloadButton.js
index 2a3e16c..20a6494 100644
--- a/src/components/DownloadButton.js
+++ b/src/components/DownloadButton.js
@@ -1,6 +1,10 @@
import React from 'react'
export default class DownloadButton extends React.Component {
+ constructor() {
+ super()
+ this.onClick = this.onClick.bind(this)
+ }
onClick(e) {
this.props.onClick(e)
@@ -9,7 +13,7 @@ export default class DownloadButton extends React.Component {
render() {
return
}
diff --git a/src/components/DownloadPage.js b/src/components/DownloadPage.js
index 5b02e12..8279246 100644
--- a/src/components/DownloadPage.js
+++ b/src/components/DownloadPage.js
@@ -17,13 +17,15 @@ export default class DownloadPage extends React.Component {
this._onChange = () => {
this.setState(DownloadStore.getState())
}
+
+ this.downloadFile = this.downloadFile.bind(this)
}
componentDidMount() {
DownloadStore.listen(this._onChange)
}
- componentDidUnmount() {
+ componentWillUnmount() {
DownloadStore.unlisten(this._onChange)
}
@@ -43,7 +45,7 @@ export default class DownloadPage extends React.Component {
Peers: {this.state.peers} · Up: {formatSize(this.state.speedUp)} · Down: {formatSize(this.state.speedDown)}
-Free peer-to-peer file transfers in your browser.
We never store anything. Files only served fresh.
@@ -57,30 +59,30 @@ export default class UploadPage extends React.Component {Processing...
- +Send someone this link to download.
This link will work as long as this page is open.
Peers: {this.state.peers} · Up: {formatSize(this.state.speedUp)}