diff options
author | eug-vs <eug-vs@keemail.me> | 2020-08-10 13:22:00 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-08-10 13:22:00 +0300 |
commit | 35fcdceb8f04fe333d45c5b1cb7ba395352c92d6 (patch) | |
tree | 965dcc6f7aaa6f18508b5785723737a1702a1980 | |
parent | a8424edaea142f159022506dc8c8799718469d30 (diff) | |
download | which-ui-35fcdceb8f04fe333d45c5b1cb7ba395352c92d6.tar.gz |
feat: only allow 1 snackbar on mobile
-rw-r--r-- | src/containers/Page/Page.tsx | 2 | ||||
-rw-r--r-- | src/containers/Profile/Profile.tsx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/containers/Page/Page.tsx b/src/containers/Page/Page.tsx index df27b74..643e6de 100644 --- a/src/containers/Page/Page.tsx +++ b/src/containers/Page/Page.tsx @@ -32,7 +32,7 @@ const Page: React.FC = () => { return ( <SnackbarProvider - maxSnack={3} + maxSnack={isMobile ? 1 : 3} anchorOrigin={{ vertical: isMobile ? 'top' : 'bottom', horizontal: 'right' diff --git a/src/containers/Profile/Profile.tsx b/src/containers/Profile/Profile.tsx index af52e5e..f7678de 100644 --- a/src/containers/Profile/Profile.tsx +++ b/src/containers/Profile/Profile.tsx @@ -16,7 +16,7 @@ const Profile: React.FC = () => { const { user } = useAuth(); const { data: userInfo, mutate: setUserInfo } = useUser(username); - const { data: polls, mutate: mutatePolls, isValidating } = useProfile(userInfo?._id); + const { data: polls, mutate: mutatePolls, isValidating } = useProfile(username); useEffect(() => { if (!username) { |