Drop unused react-transitions

This commit is contained in:
Tom Russell 2019-01-22 18:39:14 +00:00
parent b11534f094
commit 544f929fcd
2 changed files with 34 additions and 40 deletions

View File

@ -30,7 +30,6 @@
"react-leaflet": "^1.0.1", "react-leaflet": "^1.0.1",
"react-leaflet-universal": "^1.2.0", "react-leaflet-universal": "^1.2.0",
"react-router-dom": "^4.3.1", "react-router-dom": "^4.3.1",
"react-transition-group": "^2.5.0",
"serialize-javascript": "^1.5.0" "serialize-javascript": "^1.5.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,6 +1,5 @@
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import { Route, Switch, Link } from 'react-router-dom'; import { Route, Switch, Link } from 'react-router-dom';
import { TransitionGroup, CSSTransition } from 'react-transition-group'
import '../../node_modules/bootstrap/dist/css/bootstrap.min.css'; import '../../node_modules/bootstrap/dist/css/bootstrap.min.css';
import './app.css'; import './app.css';
@ -97,44 +96,40 @@ class App extends React.Component {
<Fragment> <Fragment>
<Header user={this.state.user} /> <Header user={this.state.user} />
<main> <main>
<TransitionGroup> <Switch>
<CSSTransition timeout={3000} classNames='fade'> <Route exact path="/">
<Switch> <Welcome />
<Route exact path="/"> </Route>
<Welcome /> <Route exact path="/view/:cat.html" render={(props) => (
</Route> <Overview
<Route exact path="/view/:cat.html" render={(props) => ( {...props}
<Overview mode='view' user={this.state.user}
{...props} />
mode='view' user={this.state.user} ) } />
/> <Route exact path="/edit/:cat.html" render={(props) => (
) } /> <Overview
<Route exact path="/edit/:cat.html" render={(props) => ( {...props}
<Overview mode='edit' user={this.state.user}
{...props} />
mode='edit' user={this.state.user} ) } />
/> <Route exact path="/view/:cat/building/:building.html" render={(props) => (
) } /> <BuildingView
<Route exact path="/view/:cat/building/:building.html" render={(props) => ( {...props}
<BuildingView {...this.state.building}
{...props} user={this.state.user}
{...this.state.building} building_like={this.state.building_like}
user={this.state.user} />
building_like={this.state.building_like} ) } />
/> <Route exact path="/edit/:cat/building/:building.html" render={(props) => (
) } /> <BuildingEdit
<Route exact path="/edit/:cat/building/:building.html" render={(props) => ( {...props}
<BuildingEdit {...this.state.building}
{...props} user={this.state.user}
{...this.state.building} building_like={this.state.building_like}
user={this.state.user} selectBuilding={this.selectBuilding}
building_like={this.state.building_like} />
selectBuilding={this.selectBuilding} ) } />
/> </Switch>
) } />
</Switch>
</CSSTransition>
</TransitionGroup>
<Switch> <Switch>
<Route exact path="/(edit.*|view.*)?" render={(props) => ( <Route exact path="/(edit.*|view.*)?" render={(props) => (
<ColouringMap <ColouringMap