Mailspring/app/internal_packages/notifications/lib/items/dev-mode-notif.jsx

25 lines
613 B
React
Raw Normal View History

2017-09-27 02:33:08 +08:00
import { React } from 'nylas-exports';
import { Notification } from 'nylas-component-kit';
export default class DevModeNotification extends React.Component {
static displayName = 'DevModeNotification';
constructor() {
super();
// Don't need listeners to update this, since toggling dev mode reloads
// the entire window anyway
this.state = {
inDevMode: NylasEnv.inDevMode(),
2017-09-27 02:33:08 +08:00
};
}
render() {
if (!this.state.inDevMode) {
2017-09-27 02:33:08 +08:00
return <span />;
}
return (
2017-09-27 02:33:08 +08:00
<Notification priority="0" title="Mailspring is running in dev mode and may be slower!" />
);
}
}