From cc759a2995db01b817a8cc9f5f967aa15310ab12 Mon Sep 17 00:00:00 2001 From: Joey Payne Date: Fri, 4 Mar 2016 08:57:45 -0700 Subject: [PATCH] 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. --- app/containers/App.jsx | 11 ++++++++++- app/utils.jsx | 1 + index.html | 1 - webpack.config.js | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/containers/App.jsx b/app/containers/App.jsx index 47b1e53..40dbf56 100644 --- a/app/containers/App.jsx +++ b/app/containers/App.jsx @@ -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} /> - + ) diff --git a/app/utils.jsx b/app/utils.jsx index 516d5b1..dbc575b 100644 --- a/app/utils.jsx +++ b/app/utils.jsx @@ -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) diff --git a/index.html b/index.html index a862791..8fba298 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,6 @@