11import { dashboardUrl } from '@codesandbox/common/lib/utils/url-generator' ;
2- import { useOvermind } from 'app/overmind' ;
3- import React from 'react' ;
2+ import React , { ComponentProps , FunctionComponent } from 'react' ;
43
4+ import { useOvermind } from 'app/overmind' ;
55import { UserMenu } from 'app/pages/common/UserMenu' ;
66
77import {
@@ -29,18 +29,18 @@ import {
2929import { Logo } from './Logo' ;
3030import { MenuBar } from './MenuBar' ;
3131import { SandboxName } from './SandboxName' ;
32- import { IHeaderProps } from './types' ;
3332
34- export const Header : React . FC < IHeaderProps > = ( { zenMode } ) => {
33+ type Props = Pick < ComponentProps < typeof Container > , 'zenMode' > ;
34+ export const Header : FunctionComponent < Props > = ( { zenMode } ) => {
3535 const {
3636 state : {
37+ hasLogIn,
38+ isLoggedIn,
39+ isPatron,
3740 preferences : {
3841 settings : { experimentVSCode : vscode } ,
3942 } ,
40- isPatron,
4143 updateStatus,
42- hasLogIn,
43- isLoggedIn,
4444 user,
4545 } ,
4646 } = useOvermind ( ) ;
@@ -65,13 +65,21 @@ export const Header: React.FC<IHeaderProps> = ({ zenMode }) => {
6565
6666 < Right >
6767 { updateStatus === 'available' && < RefreshButton /> }
68- { ! isLoggedIn || ( ! isPatron && < PatronButton /> ) }
68+
69+ { ! ( isLoggedIn && isPatron ) && < PatronButton /> }
70+
6971 { ! isLoggedIn && < PreferencesButton /> }
72+
7073 < NewSandboxButton />
74+
7175 { isLoggedIn && < LikeButton /> }
76+
7277 { user && user . curatorAt && < PickButton /> }
78+
7379 < ShareButton />
80+
7481 < ForkButton />
82+
7583 < AccountContainer >
7684 { isLoggedIn ? (
7785 < UserMenuContainer >
0 commit comments