Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions rair-front/src/components/Header/MainHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import useComponentVisible from '../../hooks/useComponentVisible';
import useConnectUser from '../../hooks/useConnectUser';
import { useAppDispatch, useAppSelector } from '../../hooks/useReduxHooks';
import { dataStatuses } from '../../redux/commonTypes';
import { clearResults, startSearch } from '../../redux/searchbarSlice';
import { fetchNotifications } from '../../redux/notificationsSlice';
import { clearResults, startSearch } from '../../redux/searchbarSlice';
import InputField from '../common/InputField';
import { TooltipBox } from '../common/Tooltip/TooltipBox';
import MainLogo from '../GroupLogos/MainLogo';
Expand Down Expand Up @@ -63,7 +63,9 @@ const MainHeader: FC<IMainHeader> = ({
(store) => store.user
);

const { totalCount: notificationCount, notifications } = useAppSelector(store => store.notifications);
const { totalCount: notificationCount, notifications } = useAppSelector(
(store) => store.notifications
);

const { currentUserAddress } = useAppSelector((store) => store.web3);

Expand Down Expand Up @@ -121,7 +123,7 @@ const MainHeader: FC<IMainHeader> = ({
};

useEffect(() => {
if(currentUserAddress && isLoggedIn) {
if (currentUserAddress && isLoggedIn) {
dispatch(fetchNotifications(0));
}
}, [currentUserAddress, isLoggedIn]);
Expand Down Expand Up @@ -166,7 +168,7 @@ const MainHeader: FC<IMainHeader> = ({

useEffect(() => {
dispatch(fetchNotifications());
}, [])
}, []);

return (
<HeaderContainer
Expand Down
Loading