Skip to content

Commit b42427b

Browse files
committed
better
1 parent 71fc564 commit b42427b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/DeployPage.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
33
import ky from 'ky/umd';
44
import TimeAgo from 'react-timeago';
55
import classNames from 'classnames';
6+
import { Link } from 'react-router-dom';
67

78
import AutoProgressBar from './AutoProgressBar';
89
import shortUrls from './shortUrls';
@@ -153,7 +154,7 @@ class DeployPage extends React.Component {
153154
return (
154155
<div>
155156
<h2 className="text-center">
156-
What's Deployed
157+
<Link to="/">What's Deployed</Link>{' '}
157158
{owner && repo && (
158159
<span>
159160
{' '}
@@ -226,9 +227,7 @@ class DeployTable extends React.Component {
226227
};
227228

228229
componentDidMount() {
229-
console.log('MOUNTED', this.props.code);
230230
this._restoreBorsModeChoice();
231-
// return !!prefs[this.props.code];
232231
}
233232

234233
handleBorsCheckbox = ev => {
@@ -239,7 +238,12 @@ class DeployTable extends React.Component {
239238
const prefs = JSON.parse(
240239
localStorage.getItem(this.prefBorsModeCacheKey) || '{}'
241240
);
242-
console.log('SET?', this.props.code in prefs);
241+
if (
242+
this.props.code in prefs &&
243+
prefs[this.props.code] !== this.state.borsMode
244+
) {
245+
this.setState({ borsMode: prefs[this.props.code] });
246+
}
243247
};
244248

245249
_persistBorsModeChoice = () => {

0 commit comments

Comments
 (0)