Skip to content

Commit 3c22b3c

Browse files
committed
fix(site-config.js): Adding config file for customzing new apps
1 parent e7746a3 commit 3c22b3c

File tree

3 files changed

+30
-13
lines changed

3 files changed

+30
-13
lines changed

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
},
77
"parserOptions": {
88
"ecmaVersion": 10
9+
},
10+
"rules": {
11+
"no-unused-vars": "off"
912
}
1013
}

src/components/admin-lte/index.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
33
import Configure from './configure'
44
import Tokens from './tokens'
55
import Wallet from './wallet'
6+
import siteConfig from '../site-config'
67

78
// import Audit from "./audit"
89

@@ -40,23 +41,23 @@ class AdminLTEPage extends React.Component {
4041
_this.BchWallet = BchWallet
4142

4243
_this.sidebar = [
43-
<Item icon='fa-exchange-alt' key='SendReceive' text='Send/Receive' />,
44-
<Item icon='fas-coins' key='Tokens' text='Tokens' />,
45-
<Item icon='fa-wallet' key='Wallet' text='Wallet' activeOn='/' />,
46-
<Item icon='fa-qrcode' key='qrReader' text='Qr Scanner' />,
47-
<Item icon='fas-cog' key='Configure' text='Configure' />
44+
<Item icon="fa-exchange-alt" key="SendReceive" text="Send/Receive" />,
45+
<Item icon="fas-coins" key="Tokens" text="Tokens" />,
46+
<Item icon="fa-wallet" key="Wallet" text="Wallet" activeOn="/" />,
47+
<Item icon="fa-qrcode" key="qrReader" text="Qr Scanner" />,
48+
<Item icon="fas-cog" key="Configure" text="Configure" />
4849
]
4950
}
5051

5152
render () {
5253
return (
5354
<>
54-
<AdminLTE title={['FullStack.cash']} titleShort={['PSF']} theme='blue'>
55+
<AdminLTE title={[siteConfig.title]} titleShort={[siteConfig.titleShort]} theme="blue">
5556
<Sidebar.Core>
56-
<Item key='Balance' text='Balance' icon='fab-bitcoin'>
57-
<div className='sidebar-balance'>
57+
<Item key="Balance" text="Balance" icon={siteConfig.balanceIcon}>
58+
<div className="sidebar-balance">
5859
<div>
59-
<h3>BCH Balance </h3>
60+
<h3>{siteConfig.balanceText}</h3>
6061

6162
<p>{_this.state.bchBalance}</p>
6263
</div>
@@ -71,8 +72,8 @@ class AdminLTEPage extends React.Component {
7172
<Navbar.Core>
7273
<VersionStatus />
7374
</Navbar.Core>
74-
<Layout path='/'>
75-
<div className='components-container'>
75+
<Layout path="/">
76+
<div className="components-container">
7677
{_this.state.section === 'Send/Receive' && (
7778
<SendReceive
7879
setWalletInfo={_this.props.setWalletInfo}
@@ -116,7 +117,7 @@ class AdminLTEPage extends React.Component {
116117
<ScannerModal
117118
show={_this.state.showScannerModal}
118119
handleOnHide={_this.onHandleToggleScannerModal}
119-
path='/'
120+
path="/"
120121
/>
121122
</Router>
122123
</>
@@ -298,7 +299,7 @@ class AdminLTEPage extends React.Component {
298299
return (
299300
<li style={{ display: 'none' }}>
300301
{/* Adding this childrens prevents console errors */}
301-
<a href='#'>
302+
<a href="#">
302303
<span />
303304
<span />
304305
</a>

src/components/site-config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
This file is intended to be overwritten. It provides a common place to store
3+
site configuration data.
4+
*/
5+
6+
const config = {
7+
title: 'FullStack.cash',
8+
titleShort: 'PSF',
9+
balanceText: 'BCH Balance',
10+
balanceIcon: 'fab-bitcoin'
11+
}
12+
13+
module.exports = config

0 commit comments

Comments
 (0)