Skip to content

Commit

Permalink
fixing styles and excess dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ynigoreyes committed Aug 10, 2018
1 parent 2ca52b7 commit 91d4af8
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 31 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
**/*{.,-}min.js
/public
/config/**
registerServiceWorker.js
8 changes: 4 additions & 4 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const rewireReactHotLoader = require('react-app-rewire-hot-loader')
const rewireReactHotLoader = require('react-app-rewire-hot-loader');

/* config-overrides.js */
module.exports = function override (config, env) {
config = rewireReactHotLoader(config, env)
return config
module.exports = function override(config, env) {
const newConfig = rewireReactHotLoader(config, env);
return newConfig;
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"react-redux": "5.0.7",
"react-router-dom": "4.3.1",
"react-scripts": "1.1.4",
"react-transition-group": "2.4.0",
"redux": "4.0.0"
},
"devDependencies": {
"@firebase/app-types": "0.3.2",
"babel-preset-env": "1.7.0",
"babel-preset-stage-2": "6.24.1",
"chai": "4.1.2",
"cross-env": "^5.2.0",
"enzyme": "3.3.0",
"enzyme-adapter-react-16": "1.1.1",
"esdoc": "0.5.2",
Expand All @@ -59,6 +59,7 @@
},
"jest": {
"setupTestFrameworkScriptFile": "./src/setupTest.js",
"testEnvironment": "node",
"moduleDirectories": [
"<rootDir>node_modules",
"<rootDir>src"
Expand Down
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "CPCEED",
"name": "CPCEED Time Logger",
"icons": [
{
"src": "favicon.ico",
Expand Down
13 changes: 13 additions & 0 deletions src/components/Auth/components/Auth.spec.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';

import Auth from './Auth.jsx';

describe('Auth.jsx', () => {
it('Changes tabs', () => {
const authTest = shallow(<Auth authCancelled={() => {}} />);
authTest.instance().handleTabChange(1);
expect(authTest.state().index).to.equal(1);
});
});
11 changes: 6 additions & 5 deletions src/layout/NavBar/components/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import MenuItem from '@material-ui/core/MenuItem';
import Menu from '@material-ui/core/Menu';

import { ModalView } from 'components/';
import AuthContainer from 'layout/Auth';
import AuthContainer from 'components/Auth';

import { withStyles } from '@material-ui/core/styles';

Expand Down Expand Up @@ -67,11 +67,12 @@ export class NavBar extends React.Component {
anchorEl: null,
};

// Toggles openning and closing the Login prompt
toggleAuth = () => {
this.setState({
this.setState(prevState => ({
...this.state,
auth: !this.state.auth,
});
auth: !prevState.auth,
}));
}

toggleOpenMenu = (event) => {
Expand Down Expand Up @@ -109,7 +110,7 @@ export class NavBar extends React.Component {

return (
<div className={classes.root}>
<AppBar position='fixed'>
<AppBar position='sticky'>
<Toolbar>
<IconButton onClick={this.toggleOpenMenu} color='inherit'>
<MenuIcon />
Expand Down
27 changes: 10 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2188,13 +2188,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"

cross-env@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
dependencies:
cross-spawn "^6.0.5"
is-windows "^1.0.0"

cross-spawn@5.1.0, cross-spawn@^5.0.1, cross-spawn@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
Expand Down Expand Up @@ -4665,7 +4658,7 @@ is-utf8@^0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"

is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2:
is-windows@^1.0.1, is-windows@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"

Expand Down Expand Up @@ -7062,6 +7055,15 @@ react-test-renderer@^16.0.0-0:
prop-types "^15.6.0"
react-is "^16.4.2"

react-transition-group@2.4.0, react-transition-group@^2.2.1:
version "2.4.0"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.4.0.tgz#1d9391fabfd82e016f26fabd1eec329dbd922b5a"
dependencies:
dom-helpers "^3.3.1"
loose-envify "^1.3.1"
prop-types "^15.6.2"
react-lifecycles-compat "^3.0.4"

react-transition-group@^1.1.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.1.tgz#e11f72b257f921b213229a774df46612346c7ca6"
Expand All @@ -7072,15 +7074,6 @@ react-transition-group@^1.1.1:
prop-types "^15.5.6"
warning "^3.0.0"

react-transition-group@^2.2.1:
version "2.4.0"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.4.0.tgz#1d9391fabfd82e016f26fabd1eec329dbd922b5a"
dependencies:
dom-helpers "^3.3.1"
loose-envify "^1.3.1"
prop-types "^15.6.2"
react-lifecycles-compat "^3.0.4"

react@16.4.2:
version "16.4.2"
resolved "https://registry.yarnpkg.com/react/-/react-16.4.2.tgz#2cd90154e3a9d9dd8da2991149fdca3c260e129f"
Expand Down

0 comments on commit 91d4af8

Please sign in to comment.