Skip to content

Commit

Permalink
Made changes to NavBar and adjusted Procfile and scripts to UNIX system
Browse files Browse the repository at this point in the history
  • Loading branch information
amanmibra committed Jun 19, 2018
1 parent 5308db1 commit 8af5bae
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 16 deletions.
8 changes: 7 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ GEM
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (8.0.0)
bcrypt (3.1.11)
bcrypt (3.1.11-x86-mingw32)
bindex (0.5.0)
builder (3.2.3)
Expand Down Expand Up @@ -73,6 +74,7 @@ GEM
execjs (2.7.0)
faker (1.8.7)
i18n (>= 0.7)
ffi (1.9.23)
ffi (1.9.23-x86-mingw32)
foreman (0.84.0)
thor (~> 0.19.1)
Expand All @@ -98,9 +100,12 @@ GEM
minitest (5.11.3)
multi_json (1.13.1)
nio4r (2.3.1)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
nokogiri (1.8.2-x86-mingw32)
mini_portile2 (~> 2.3.0)
orm_adapter (0.5.0)
pg (0.21.0)
pg (0.21.0-x86-mingw32)
public_suffix (3.0.2)
puma (3.11.4)
Expand Down Expand Up @@ -202,6 +207,7 @@ GEM
nokogiri (~> 1.8)

PLATFORMS
ruby
x86-mingw32

DEPENDENCIES
Expand All @@ -228,4 +234,4 @@ DEPENDENCIES
webpacker

BUNDLED WITH
1.16.1
1.16.2
2 changes: 1 addition & 1 deletion Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
backend: bundle exec puma -p $PORT
webpack-frontend: ruby bin\webpack-dev-server
webpack-frontend: ruby bin/webpack-dev-server
39 changes: 28 additions & 11 deletions app/javascript/src/containers/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import {
import { push } from './../actions/router';

// components
import { Menu } from 'semantic-ui-react';
import { Menu, Icon } from 'semantic-ui-react';

class NavBar extends Component {
handleLogout = () => {
this.props.logoutUser();
}

handleClick = (e, data) => {
switch (data.children) {
switch (data.children[1]) {
case 'Home':
this.props.push('/app')
break;
Expand All @@ -30,6 +30,9 @@ class NavBar extends Component {
case 'User Profile':
this.props.push('/app/user')
break;
case 'Team Profile':
this.props.push('/app/team')
break;
default:
return;
}
Expand All @@ -39,35 +42,49 @@ class NavBar extends Component {
const { router } = this.props;
const path = router.location.pathname;
return (
<div>
<Menu fixed="top" inverted>
<Menu.Item header>Krzyzewskiville Scheduler ⛺</Menu.Item>
<div style={{ paddingBottom: '75px'}}>
<Menu fixed="top" inverted color="blue" icon="labeled">
<Menu.Item header>
<div style={{fontSize: '2em', paddingBottom: '4px'}}></div>
Krzyzewskiville Scheduler
</Menu.Item>
<Menu.Item
as='a'
active={path === '/app'}
color="blue"
active={path === '/app' || path === '/app/'}
onClick={this.handleClick}
>
<Icon name="home" />
Home
</Menu.Item>
<Menu.Item
as='a'
active={path === '/app/dashboard'}
color="blue"
onClick={this.handleClick}
>
<Icon name="dashboard" />
Dashboard
</Menu.Item>
<Menu.Menu position="right" color="red">
<Menu.Menu position="right">
<Menu.Item
as='a'
active={path === '/app/team'}
onClick={this.handleClick}
>
<Icon name="users" />
Team Profile
</Menu.Item>
<Menu.Item
as='a'
active={path === '/app/user'}
color="blue"
onClick={this.handleClick}
>
<Icon name="user" />
User Profile
</Menu.Item>
<Menu.Item as='a' onClick={this.handleLogout}>Logout</Menu.Item>
<Menu.Item as='a' onClick={this.handleLogout}>
<Icon name="sign out" />
Logout
</Menu.Item>
</Menu.Menu>
</Menu>
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/javascript/src/reducers/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ const login = (state=initialState, action) => {
};
}

// case '@@router/LOCATION_CHANGE': {
// return initialState;
// }
case '@@router/LOCATION_CHANGE': {
return initialState;
}

// API actions for login
case 'BEGIN_GET_TEAMS': {
Expand Down
Empty file modified bin/db-flush.sh
100644 → 100755
Empty file.

0 comments on commit 8af5bae

Please sign in to comment.