We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fdfedb4 + 3f58e27 commit 208468dCopy full SHA for 208468d
src/components/base/Header.tsx
@@ -21,9 +21,16 @@ export type MainHeaderProps = {};
21
22
function Header(props: MainHeaderProps) {
23
const dispatch = useDispatch();
24
- const { data: notificationCountData, refetch } = useQuery(NOTIFICATION_COUNT);
25
26
const { user, onLoginClick, onLogout, customHeader } = useHeader();
+ const { data: notificationCountData, refetch } = useQuery(
27
+ NOTIFICATION_COUNT,
28
+ {
29
+ fetchPolicy: 'network-only',
30
+ skip: !user,
31
+ },
32
+ );
33
+
34
const [userMenu, toggleUserMenu] = useToggle(false);
35
const ref = useRef<HTMLDivElement>(null);
36
0 commit comments