diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-11-29 04:58:11 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-11-29 05:09:05 +0800 |
commit | 1375d694ac2026ff8fe553f2b7bc9daa4d5f6d7d (patch) | |
tree | 3d92f8fb29af60311e08a0a23145eab53b5ed496 /packages/instant/src/containers | |
parent | 53f8e1b3b426424bf4459605b48e706eb7fb6d90 (diff) | |
download | dexon-sol-tools-1375d694ac2026ff8fe553f2b7bc9daa4d5f6d7d.tar dexon-sol-tools-1375d694ac2026ff8fe553f2b7bc9daa4d5f6d7d.tar.gz dexon-sol-tools-1375d694ac2026ff8fe553f2b7bc9daa4d5f6d7d.tar.bz2 dexon-sol-tools-1375d694ac2026ff8fe553f2b7bc9daa4d5f6d7d.tar.lz dexon-sol-tools-1375d694ac2026ff8fe553f2b7bc9daa4d5f6d7d.tar.xz dexon-sol-tools-1375d694ac2026ff8fe553f2b7bc9daa4d5f6d7d.tar.zst dexon-sol-tools-1375d694ac2026ff8fe553f2b7bc9daa4d5f6d7d.zip |
fix: instant error no longer makes instant move
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r-- | packages/instant/src/containers/latest_error.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/instant/src/containers/latest_error.tsx b/packages/instant/src/containers/latest_error.tsx index b7cfdb504..0d4349124 100644 --- a/packages/instant/src/containers/latest_error.tsx +++ b/packages/instant/src/containers/latest_error.tsx @@ -4,6 +4,7 @@ import { connect } from 'react-redux'; import { Dispatch } from 'redux'; import { SlidingError } from '../components/sliding_error'; +import { Container } from '../components/ui/container'; import { Overlay } from '../components/ui/overlay'; import { Action } from '../redux/actions'; import { State } from '../redux/reducer'; @@ -23,7 +24,12 @@ export interface LatestErrorComponentProps { export const LatestErrorComponent: React.StatelessComponent<LatestErrorComponentProps> = props => { if (!props.latestErrorMessage) { - return <div />; + // Render a hidden SlidingError such that instant does not move when a real error is rendered. + return ( + <Container isHidden={true}> + <SlidingError animationState="slidIn" icon="😢" message="" /> + </Container> + ); } return ( <React.Fragment> |