@@ -12,7 +12,8 @@ import {
1212 Menu ,
1313 MenuItem ,
1414 Toolbar ,
15- Typography
15+ Typography ,
16+ withStyles
1617} from '@material-ui/core' ;
1718import {
1819 Assignment as AssignmentIcon ,
@@ -22,7 +23,6 @@ import {
2223 Menu as MenuIcon ,
2324 Work as WorkIcon
2425} from '@material-ui/icons' ;
25- import { withStyles } from '@material-ui/core/styles' ;
2626import withRoot from './withRoot' ;
2727import Dashboard from './Dashboard/dashboard' ;
2828import * as actions from './actions/index' ;
@@ -33,132 +33,132 @@ import {fab} from '@fortawesome/free-brands-svg-icons';
3333library . add ( fab ) ;
3434
3535const styles = theme => ( {
36- root : {
37- ...theme . mixins . gutters ( ) ,
38- textAlign : 'center' ,
39- flexGrow : 1 ,
40- } ,
41- navTitle : {
42- flexGrow : 1 ,
43- textAlign : 'center' ,
44- } ,
45- anchorEl : {
46- marginLeft : - 12 ,
47- marginRight : 20 ,
48- } ,
49- dashboard : {
50- flexGrow : 1 ,
51- } ,
52- footer : {
53- flexGrow : 1 ,
54- }
36+ root : {
37+ ...theme . mixins . gutters ( ) ,
38+ textAlign : 'center' ,
39+ flexGrow : 1 ,
40+ } ,
41+ navTitle : {
42+ flexGrow : 1 ,
43+ textAlign : 'center' ,
44+ } ,
45+ anchorEl : {
46+ marginLeft : - 12 ,
47+ marginRight : 20 ,
48+ } ,
49+ dashboard : {
50+ flexGrow : 1 ,
51+ } ,
52+ footer : {
53+ flexGrow : 1 ,
54+ }
5555} ) ;
5656
5757class App extends Component {
58- state = {
59- anchorEl : null ,
60- } ;
58+ state = {
59+ anchorEl : null ,
60+ } ;
6161
62- handleMenuClick = event => {
63- this . setState ( { anchorEl : event . currentTarget } ) ;
64- } ;
62+ handleMenuClick = event => {
63+ this . setState ( { anchorEl : event . currentTarget } ) ;
64+ } ;
6565
66- handleMenuClose = ( ) => {
67- this . setState ( { anchorEl : null } ) ;
68- } ;
66+ handleMenuClose = ( ) => {
67+ this . setState ( { anchorEl : null } ) ;
68+ } ;
6969
70- handleBottomNavChange = ( event , bottomNavValue ) => {
71- this . setState ( { bottomNavValue} ) ;
72- } ;
70+ handleBottomNavChange = ( event , bottomNavValue ) => {
71+ this . setState ( { bottomNavValue} ) ;
72+ } ;
7373
74- render ( ) {
75- const { classes} = this . props ;
76- const { anchorEl} = this . state ;
74+ render ( ) {
75+ const { classes} = this . props ;
76+ const { anchorEl} = this . state ;
7777
78- return (
79- < div className = { classes . root } >
80- < AppBar position = "static" >
81- < Toolbar >
82- < IconButton className = { classes . anchorEl } color = "inherit" aria-label = "Menu"
83- onClick = { this . handleMenuClick } >
84- < MenuIcon />
85- </ IconButton >
86- < Menu
87- id = "simple-menu"
88- anchorEl = { anchorEl }
89- open = { Boolean ( anchorEl ) }
90- onClose = { this . handleMenuClose }
91- TransitionComponent = { Fade }
92- >
93- < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/" >
94- < ListItemIcon className = { classes . icon } >
95- < DashboardIcon />
96- </ ListItemIcon >
97- < ListItemText classes = { { primary : classes . primary } } inset primary = "Overview" />
98- </ MenuItem >
99- < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/experience" >
100- < ListItemIcon className = { classes . icon } >
101- < WorkIcon />
102- </ ListItemIcon >
103- < ListItemText classes = { { primary : classes . primary } } inset primary = "Experience" />
104- </ MenuItem >
105- < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/education" >
106- < ListItemIcon className = { classes . icon } >
107- < AssignmentIcon />
108- </ ListItemIcon >
109- < ListItemText classes = { { primary : classes . primary } } inset primary = "Education" />
110- </ MenuItem >
111- < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/projects" >
112- < ListItemIcon className = { classes . icon } >
113- < CodeIcon />
114- </ ListItemIcon >
115- < ListItemText classes = { { primary : classes . primary } } inset primary = "Projects" />
116- </ MenuItem >
117- < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/contact_info" >
118- < ListItemIcon className = { classes . icon } >
119- < LocationOnIcon />
120- </ ListItemIcon >
121- < ListItemText classes = { { primary : classes . primary } } inset primary = "Contact Information" />
122- </ MenuItem >
123- </ Menu >
124- < Typography variant = "h6" color = "inherit" className = { classes . navTitle } >
125- Ishan Kaul Resume
126- </ Typography >
127- </ Toolbar >
128- </ AppBar >
129- < Dashboard className = { classes . dashboard } />
130- < BottomNavigation
131- value = { this . props . bottomNavValue }
132- onChange = { this . handleBottomNavChange }
133- showLabels
134- className = { classes . footer }
135- >
136- < BottomNavigationAction component = { Link } to = "/" label = "Overview" icon = { < DashboardIcon /> } />
137- < BottomNavigationAction component = { Link } to = "/experience" label = "Experience"
138- icon = { < WorkIcon /> } />
139- < BottomNavigationAction component = { Link } to = "/education" label = "Education"
140- icon = { < AssignmentIcon /> } />
141- < BottomNavigationAction component = { Link } to = "/projects" label = "Projects"
142- icon = { < CodeIcon /> } />
143- < BottomNavigationAction component = { Link } to = "/contact_info" label = "Contact Information"
144- icon = { < LocationOnIcon /> } />
145- </ BottomNavigation >
146- </ div >
147- ) ;
148- }
78+ return (
79+ < div className = { classes . root } >
80+ < AppBar position = "static" >
81+ < Toolbar >
82+ < IconButton className = { classes . anchorEl } color = "inherit" aria-label = "Menu"
83+ onClick = { this . handleMenuClick } >
84+ < MenuIcon />
85+ </ IconButton >
86+ < Menu
87+ id = "simple-menu"
88+ anchorEl = { anchorEl }
89+ open = { Boolean ( anchorEl ) }
90+ onClose = { this . handleMenuClose }
91+ TransitionComponent = { Fade }
92+ >
93+ < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/" >
94+ < ListItemIcon className = { classes . icon } >
95+ < DashboardIcon />
96+ </ ListItemIcon >
97+ < ListItemText classes = { { primary : classes . primary } } inset primary = "Overview" />
98+ </ MenuItem >
99+ < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/experience" >
100+ < ListItemIcon className = { classes . icon } >
101+ < WorkIcon />
102+ </ ListItemIcon >
103+ < ListItemText classes = { { primary : classes . primary } } inset primary = "Experience" />
104+ </ MenuItem >
105+ < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/education" >
106+ < ListItemIcon className = { classes . icon } >
107+ < AssignmentIcon />
108+ </ ListItemIcon >
109+ < ListItemText classes = { { primary : classes . primary } } inset primary = "Education" />
110+ </ MenuItem >
111+ < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/projects" >
112+ < ListItemIcon className = { classes . icon } >
113+ < CodeIcon />
114+ </ ListItemIcon >
115+ < ListItemText classes = { { primary : classes . primary } } inset primary = "Projects" />
116+ </ MenuItem >
117+ < MenuItem onClick = { this . handleMenuClose } component = { Link } to = "/contact_info" >
118+ < ListItemIcon className = { classes . icon } >
119+ < LocationOnIcon />
120+ </ ListItemIcon >
121+ < ListItemText classes = { { primary : classes . primary } } inset primary = "Contact Information" />
122+ </ MenuItem >
123+ </ Menu >
124+ < Typography variant = "h6" color = "inherit" className = { classes . navTitle } >
125+ Ishan Kaul Resume
126+ </ Typography >
127+ </ Toolbar >
128+ </ AppBar >
129+ < Dashboard className = { classes . dashboard } />
130+ < BottomNavigation
131+ value = { this . props . bottomNavValue }
132+ onChange = { this . handleBottomNavChange }
133+ showLabels
134+ className = { classes . footer }
135+ >
136+ < BottomNavigationAction component = { Link } to = "/" label = "Overview" icon = { < DashboardIcon /> } />
137+ < BottomNavigationAction component = { Link } to = "/experience" label = "Experience"
138+ icon = { < WorkIcon /> } />
139+ < BottomNavigationAction component = { Link } to = "/education" label = "Education"
140+ icon = { < AssignmentIcon /> } />
141+ < BottomNavigationAction component = { Link } to = "/projects" label = "Projects"
142+ icon = { < CodeIcon /> } />
143+ < BottomNavigationAction component = { Link } to = "/contact_info" label = "Contact Information"
144+ icon = { < LocationOnIcon /> } />
145+ </ BottomNavigation >
146+ </ div >
147+ ) ;
148+ }
149149}
150150
151151const mapDispatchToProps = dispatch => {
152- return {
153- setNavIndex : ( selectedIndex ) => dispatch ( actions . setNavIndex ( selectedIndex ) ) ,
154- getNavIndex : ( ) => dispatch ( actions . getNavIndex ( ) )
155- } ;
152+ return {
153+ setNavIndex : ( selectedIndex ) => dispatch ( actions . setNavIndex ( selectedIndex ) ) ,
154+ getNavIndex : ( ) => dispatch ( actions . getNavIndex ( ) )
155+ } ;
156156} ;
157157
158158const mapStateToProps = ( state ) => {
159- return {
160- bottomNavValue : state . nav . selected
161- }
159+ return {
160+ bottomNavValue : state . nav . selected
161+ }
162162} ;
163163
164164export default connect ( mapStateToProps , mapDispatchToProps ) ( withRoot ( withStyles ( styles ) ( App ) ) ) ;
0 commit comments