-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathApp.js
More file actions
66 lines (55 loc) · 1.77 KB
/
App.js
File metadata and controls
66 lines (55 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import { Route, NavLink, Switch, withRouter } from 'react-router-dom';
import MyComps from './components/myComps/MyComps';
import MyPhones from './components/myPhones/MyPhones';
import MyPads from './components/myPads/MyPads';
import MainContent from './components/mainContent/MainContent';
import { CSSTransition,TransitionGroup } from 'react-transition-group';
class App extends Component {
constructor(){
super();
}
render() {
return (
<div className="App">
<header className='header-wrapper'>
<div className='home-btn'>
<NavLink exact to='/'>Home</NavLink>
</div>
<div className="top-header">
<NavLink to='/myComps' >myComps</NavLink>
<NavLink to='/myPhones' >myPhones</NavLink>
<NavLink to='/myPads' >myPads</NavLink>
</div>
<div className='sub-header'>
<Route path='/myComps' component={MyComps} />
<Route path='/myPhones' component={MyPhones} />
<Route path='/myPads' component={MyPads} />
</div>
</header>
{/* <TransitionGroup>
<CSSTransition
key={this.props.location.pathname}
timeout={500}
classNames="fade"
>
<Switch location={this.props.location}>
<MainContent />
</Switch>
</CSSTransition>
</TransitionGroup> */}
<CSSTransition
in={true}
appear={true}
timeout={600}
classNames="fade"
>
<MainContent />
</CSSTransition>
</div>
);
}
}
export default App;