From 37824ad373fa38711459248004c0462c5ad253a8 Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Mon, 11 Feb 2019 13:58:05 +0300 Subject: [PATCH] use native animations (fixes #2) --- frontend/src/Auth/AuthScreen.tsx | 7 ++++--- frontend/src/Documents/DocumentEdit.tsx | 1 + frontend/src/Home/Home.tsx | 7 ++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/Auth/AuthScreen.tsx b/frontend/src/Auth/AuthScreen.tsx index e4d1110..113c190 100644 --- a/frontend/src/Auth/AuthScreen.tsx +++ b/frontend/src/Auth/AuthScreen.tsx @@ -7,7 +7,7 @@ import { Switch, withRouter, } from "react-router"; -import { Transition } from "react-spring/renderprops"; +import { animated, Transition } from "react-spring/renderprops"; import { IAppState } from "~redux/reducers"; import { Login } from "./Login"; @@ -30,6 +30,7 @@ export class AuthScreenComponent extends React.PureComponent { ) : (
{ }} > {(_location: any) => (style: any) => ( -
+ -
+ )}
diff --git a/frontend/src/Documents/DocumentEdit.tsx b/frontend/src/Documents/DocumentEdit.tsx index b11525c..7591dd9 100644 --- a/frontend/src/Documents/DocumentEdit.tsx +++ b/frontend/src/Documents/DocumentEdit.tsx @@ -107,6 +107,7 @@ export class DocumentEditComponent extends React.PureComponent< ); } else { + this.tryLoad(); return this.props.spinner && ; } } diff --git a/frontend/src/Home/Home.tsx b/frontend/src/Home/Home.tsx index 9f48991..6720242 100644 --- a/frontend/src/Home/Home.tsx +++ b/frontend/src/Home/Home.tsx @@ -13,7 +13,7 @@ import { import * as React from "react"; import { connect } from "react-redux"; import { Route, RouteComponentProps, Switch, withRouter } from "react-router"; -import { config, Transition } from "react-spring/renderprops"; +import { animated, config, Transition } from "react-spring/renderprops"; import { Dispatch } from "redux"; import { IDocumentJSON } from "~../../src/entity/Document"; import { IUserJSON } from "~../../src/entity/User"; @@ -111,6 +111,7 @@ export class HomeComponent extends React.PureComponent {
{ }} > {(_location: any) => (style: any) => ( -
+ { /> -
+ )}