react-toastify#Bounce JavaScript Examples
The following examples show how to use
react-toastify#Bounce.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: App.js From viade_en2b with MIT License | 5 votes |
render() {
/* setInterval(() => {
notificationsRecieved();
}, 2000);*/
setTimeout(() => {
if (this.state.render === 0)
this.setState({
render: 1,
});
}, 5000);
if (
window.performance &&
window.performance.navigation.type == 1 &&
window.location.href.charAt(window.location.href.length - 1) != "/"
) {
return (
<Router>
<Redirect to="/" />
</Router>
);
}
if (this.state.render > 0)
return (
<Fragment>
<ToastContainer
closeOnClick
draggable={true}
transition={Bounce}
autoClose={3200}
/>
<Router>
<Fragment>
<Switch>
<Route exact path="/" component={MainPage} />
<Route exact path="/login" component={LoginPage} />
<Route exact path="/routes" component={RoutesPage} />
<Route exact path="/friends-list" component={FriendsPage} />
<Route exact path="/upload" component={DropzonePage} />
<Route exact path="/about" component={AboutPage} />
<Route
exact
path="/notifications"
component={NotificationsPage}
/>
<Route exact path="/saveroute" component={SaveRoutePage} />
<Route exact path="/gpx" component={ImportGpxPage} />
<Route exact path="/groups" component={FriendGroupsPage} />
<Route
exact
path="/groupdetails"
component={SeeFriendsOfGroupPage}
/>
<Route
exact
path="/creategroup"
component={CreateFriendGroupPage}
/>
<Route exact path="/shareroute" component={ShareRoutePage} />
</Switch>
</Fragment>
</Router>
</Fragment>
);
else {
return (
<Fragment>
<video id="viadegif" autoPlay muted>
<source src="videos/ViaDe.mp4" type="video/mp4" />
</video>
</Fragment>
);
}
}