Mailspring/internal_packages/notifications/lib/items/dev-mode-notif.jsx
Halla Moore afbcfb6853 fix(sidebar-notifs): Set containersRequired on the notifs-wrapper
Switch from manually setting containerRequired to false on each individual
notification to setting it on the InjectedComponentSet within the
notifs-wrapper. This way, people adding new notifications don't need to
remember to manually set it themselves.
2016-11-01 11:46:47 -07:00

27 lines
602 B
JavaScript

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(),
}
}
render() {
if (!this.state.inDevMode) {
return <span />
}
return (
<Notification
priority="0"
title="N1 is running in dev mode!"
/>
)
}
}