Adjust APP_NAME to be inside utils
APP_NAME should be visible from any component and module, so putting it in utils makes the most sense.
This commit is contained in:
parent
e53cbd0fc6
commit
cc759a2995
4 changed files with 12 additions and 2 deletions
|
|
@ -11,6 +11,8 @@ import { connect } from 'react-redux'
|
|||
import LibraryNav from 'LibraryNav'
|
||||
import EntrySelector from 'EntrySelector'
|
||||
|
||||
import * as utils from 'utils'
|
||||
|
||||
const {
|
||||
Popover,
|
||||
Menu,
|
||||
|
|
@ -44,6 +46,10 @@ class App extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
name: utils.APP_NAME
|
||||
};
|
||||
|
||||
static get childContextTypes(){
|
||||
return {muiTheme: React.PropTypes.object}
|
||||
}
|
||||
|
|
@ -95,7 +101,10 @@ class App extends React.Component {
|
|||
className="left inline fill-height"
|
||||
{...contextMenuActions}
|
||||
/>
|
||||
<EntrySelector id="entry-selector" className="left inline fill-height" />
|
||||
<EntrySelector
|
||||
id="entry-selector"
|
||||
className="left inline fill-height"
|
||||
/>
|
||||
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import mkdirp from 'mkdirp'
|
|||
import jsfile from 'jsonfile'
|
||||
import rmdir from 'rimraf'
|
||||
|
||||
var APP_NAME = 'TechNote'
|
||||
|
||||
export function getAppDataPath(){
|
||||
return path.datadir(APP_NAME)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
<div id="main">
|
||||
</div>
|
||||
<script>
|
||||
var APP_NAME = 'TechNote'
|
||||
window.$ = window.jQuery = require('./app/static/jquery-1.12.0.min.js');
|
||||
$(document).ready(function(){
|
||||
document.addEventListener("keydown", function (e) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
entry: './index.jsx',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue