Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: affiliate

Nevo Davidf5a5170c7f2c
diff --git a/apps/frontend/src/components/layout/top.menu.tsx b/apps/frontend/src/components/layout/top.menu.tsx
index 11c7ba6e2..e750963c6 100644
--- a/apps/frontend/src/components/layout/top.menu.tsx
+++ b/apps/frontend/src/components/layout/top.menu.tsx
@@ -8,16 +8,16 @@ import { useUser } from '@gitroom/frontend/components/layout/user.context';
import { useVariables } from '@gitroom/react/helpers/variable.context';
export const useMenuItems = () => {
- const {isGeneral} = useVariables();
+ const { isGeneral } = useVariables();
return [
...(!isGeneral
? [
- {
- name: 'Analytics',
- icon: 'analytics',
- path: '/analytics',
- },
- ]
+ {
+ name: 'Analytics',
+ icon: 'analytics',
+ path: '/analytics',
+ },
+ ]
: []),
{
name: isGeneral ? 'Calendar' : 'Launches',
@@ -26,22 +26,22 @@ export const useMenuItems = () => {
},
...(isGeneral
? [
- {
- name: 'Analytics',
- icon: 'analytics',
- path: '/analytics',
- },
- ]
+ {
+ name: 'Analytics',
+ icon: 'analytics',
+ path: '/analytics',
+ },
+ ]
: []),
...(!isGeneral
? [
- {
- name: 'Settings',
- icon: 'settings',
- path: '/settings',
- role: ['ADMIN', 'SUPERADMIN'],
- },
- ]
+ {
+ name: 'Settings',
+ icon: 'settings',
+ path: '/settings',
+ role: ['ADMIN', 'SUPERADMIN'],
+ },
+ ]
: []),
{
name: 'Marketplace',
@@ -60,13 +60,20 @@ export const useMenuItems = () => {
role: ['ADMIN', 'SUPERADMIN'],
requireBilling: true,
},
+ {
+ name: 'Affiliate',
+ icon: 'affiliate',
+ path: 'https://affiliate.postiz.com',
+ role: ['ADMIN', 'SUPERADMIN', 'USER'],
+ requireBilling: true,
+ },
];
-}
+};
export const TopMenu: FC = () => {
const path = usePathname();
const user = useUser();
- const {billingEnabled} = useVariables();
+ const { billingEnabled } = useVariables();
const menuItems = useMenuItems();
return (
@@ -86,6 +93,7 @@ export const TopMenu: FC = () => {
<li key={item.name}>
<Link
prefetch={true}
+ target={item.path.indexOf('http') > -1 ? '_blank' : '_self'}
href={item.path}
className={clsx(
'flex gap-2 items-center box px-[6px] md:px-[24px] py-[8px]',