mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
28 lines
638 B
JavaScript
28 lines
638 B
JavaScript
import {React} from 'nylas-exports';
|
|
import {Notification} from 'nylas-component-kit';
|
|
|
|
export default class DevModeNotification extends React.Component {
|
|
static displayName = 'DevModeNotification';
|
|
static containerRequired = false;
|
|
|
|
constructor() {
|
|
super();
|
|
// Don't need listeners to update this, since toggling dev mode reloads
|
|
// the entire window anyway
|
|
this.state = {
|
|
inDevMode: NylasEnv.inDevMode(),
|
|
}
|
|
}
|
|
|
|
render() {
|
|
if (!this.state.inDevMode) {
|
|
return <span />
|
|
}
|
|
return (
|
|
<Notification
|
|
priority="0"
|
|
title="N1 is running in dev mode!"
|
|
/>
|
|
)
|
|
}
|
|
}
|