Skip to content

Commit

Permalink
fix(mainNav): Add import useDispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
whalekiller03 committed Jul 25, 2024
1 parent 11122b3 commit 59ff4b3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { keyframes, css } from '@emotion/react';
import styled from '@emotion/styled';
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
import { useDispatch } from 'react-redux';
import { userLogout } from '@/redux/actions/user';
import useMediaQuery from '@mui/material/useMediaQuery';

Expand Down Expand Up @@ -35,6 +36,7 @@ const StyledMenuItem = styled(MenuItem)`
`;

const UserAvatar = ({ onCloseMenu = () => {}, user }) => {
const dispatch = useDispatch();
const isPadScreen = useMediaQuery('(max-width: 767px)');

const { push } = useRouter();
Expand Down Expand Up @@ -85,7 +87,7 @@ const UserAvatar = ({ onCloseMenu = () => {}, user }) => {
zIndex: 1,
}}
>
<Box sx={{ padding: !isPadScreen && '12px' }}>
<Box as="ul" sx={{ padding: !isPadScreen && '12px' }}>
{[
{ name: '個人資料', id: 'person-setting' },
{ name: '我的揪團', id: 'my-group' },
Expand Down

0 comments on commit 59ff4b3

Please sign in to comment.