diff options
author | ilyayudovin <46264063+ilyayudovin@users.noreply.github.com> | 2020-07-01 18:43:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-01 18:43:54 +0300 |
commit | 0b234a7ae255990d71f847a5519482ccb0d83fcb (patch) | |
tree | 7cfd6ff4b8bd154074b9a42aaf4efe5b9cd471e6 /src/pages/Page.tsx | |
parent | fc552cbf3ffcba6d2cc7003936f4b55378541525 (diff) | |
parent | f9999d6da7752a55ad01f85dce34086c1acbff5a (diff) | |
download | which-ui-0b234a7ae255990d71f847a5519482ccb0d83fcb.tar.gz |
Merge pull request #55 from which-ecosystem/snackbar
snackbar
Diffstat (limited to 'src/pages/Page.tsx')
-rw-r--r-- | src/pages/Page.tsx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/pages/Page.tsx b/src/pages/Page.tsx index 6d4315e..f6353b2 100644 --- a/src/pages/Page.tsx +++ b/src/pages/Page.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; +import { SnackbarProvider } from 'notistack'; import ProfilePage from './ProfilePage/ProfilePage'; import FeedPage from './FeedPage/FeedPage'; import AuthPage from './AuthPage/AuthPage'; @@ -18,11 +19,19 @@ const Page: React.FC = () => { const classes = useStyles(); return ( - <div className={classes.root}> - { page.prefix === 'profile' && <ProfilePage />} - { page.prefix === 'feed' && <FeedPage /> } - { page.prefix === 'auth' && <AuthPage /> } - </div> + <SnackbarProvider + maxSnack={3} + anchorOrigin={{ + vertical: 'bottom', + horizontal: 'right' + }} + > + <div className={classes.root}> + { page.prefix === 'profile' && <ProfilePage />} + { page.prefix === 'feed' && <FeedPage /> } + { page.prefix === 'auth' && <AuthPage /> } + </div> + </SnackbarProvider> ); }; |