mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
afbcfb6853
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.
27 lines
602 B
JavaScript
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!"
|
|
/>
|
|
)
|
|
}
|
|
}
|