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.
1 parent 1011eff commit 59a5d04Copy full SHA for 59a5d04
packages/app/src/app/pages/common/UserMenu/index.tsx
@@ -1,13 +1,12 @@
1
import Relative from '@codesandbox/common/lib/components/Relative';
2
-import React, { FunctionComponent } from 'react';
3
-
4
-import { useMenuState, MenuDisclosure } from 'reakit/Menu';
5
import { useOvermind } from 'app/overmind';
+import React, { FunctionComponent } from 'react';
+import { MenuDisclosure, useMenuState } from 'reakit/Menu';
6
7
import {
8
- UserMenuContainer,
9
ClickableContainer,
10
ProfileImage,
+ UserMenuContainer,
11
} from './elements';
12
import { Menu } from './Menu';
13
@@ -24,6 +23,10 @@ export const UserMenu: FunctionComponent = props => {
24
23
placement: 'bottom-end',
25
});
26
+ if (!user) {
27
+ return null;
28
+ }
29
+
30
return (
31
<UserMenuContainer>
32
<Relative>
0 commit comments