@@ -8,16 +8,16 @@ import { useUser } from '@gitroom/frontend/components/layout/user.context';
88import { useVariables } from '@gitroom/react/helpers/variable.context' ;
99
1010export const useMenuItems = ( ) => {
11- const { isGeneral} = useVariables ( ) ;
11+ const { isGeneral } = useVariables ( ) ;
1212 return [
1313 ...( ! isGeneral
1414 ? [
15- {
16- name : 'Analytics' ,
17- icon : 'analytics' ,
18- path : '/analytics' ,
19- } ,
20- ]
15+ {
16+ name : 'Analytics' ,
17+ icon : 'analytics' ,
18+ path : '/analytics' ,
19+ } ,
20+ ]
2121 : [ ] ) ,
2222 {
2323 name : isGeneral ? 'Calendar' : 'Launches' ,
@@ -26,22 +26,22 @@ export const useMenuItems = () => {
2626 } ,
2727 ...( isGeneral
2828 ? [
29- {
30- name : 'Analytics' ,
31- icon : 'analytics' ,
32- path : '/analytics' ,
33- } ,
34- ]
29+ {
30+ name : 'Analytics' ,
31+ icon : 'analytics' ,
32+ path : '/analytics' ,
33+ } ,
34+ ]
3535 : [ ] ) ,
3636 ...( ! isGeneral
3737 ? [
38- {
39- name : 'Settings' ,
40- icon : 'settings' ,
41- path : '/settings' ,
42- role : [ 'ADMIN' , 'SUPERADMIN' ] ,
43- } ,
44- ]
38+ {
39+ name : 'Settings' ,
40+ icon : 'settings' ,
41+ path : '/settings' ,
42+ role : [ 'ADMIN' , 'SUPERADMIN' ] ,
43+ } ,
44+ ]
4545 : [ ] ) ,
4646 {
4747 name : 'Marketplace' ,
@@ -60,13 +60,20 @@ export const useMenuItems = () => {
6060 role : [ 'ADMIN' , 'SUPERADMIN' ] ,
6161 requireBilling : true ,
6262 } ,
63+ {
64+ name : 'Affiliate' ,
65+ icon : 'affiliate' ,
66+ path : 'https://affiliate.postiz.com' ,
67+ role : [ 'ADMIN' , 'SUPERADMIN' , 'USER' ] ,
68+ requireBilling : true ,
69+ } ,
6370 ] ;
64- }
71+ } ;
6572
6673export const TopMenu : FC = ( ) => {
6774 const path = usePathname ( ) ;
6875 const user = useUser ( ) ;
69- const { billingEnabled} = useVariables ( ) ;
76+ const { billingEnabled } = useVariables ( ) ;
7077 const menuItems = useMenuItems ( ) ;
7178
7279 return (
@@ -86,6 +93,7 @@ export const TopMenu: FC = () => {
8693 < li key = { item . name } >
8794 < Link
8895 prefetch = { true }
96+ target = { item . path . indexOf ( 'http' ) > - 1 ? '_blank' : '_self' }
8997 href = { item . path }
9098 className = { clsx (
9199 'flex gap-2 items-center box px-[6px] md:px-[24px] py-[8px]' ,
0 commit comments