|
1 | 1 | import React, { forwardRef, useState } from 'react' |
2 | 2 | import { useSignoutUser } from 'hooks/useSignoutUser' |
3 | | -import { isMobile } from 'react-device-detect' |
4 | 3 | import * as R from 'remeda' |
5 | 4 |
|
6 | | -import { SITE_URL } from '@gitmono/config' |
| 5 | +// import { isMobile } from 'react-device-detect' |
| 6 | +// import { SITE_URL } from '@gitmono/config' |
| 7 | +// import { useIsDesktopApp } from '@gitmono/ui/src/hooks' |
| 8 | + |
7 | 9 | import { |
8 | | - AccessIcon, |
9 | | - AppsIcon, |
10 | 10 | Button, |
11 | | - CalendarIcon, |
12 | | - CodeIcon, |
13 | 11 | DotsHorizontal, |
14 | | - FigmaOutlineIcon, |
15 | 12 | GearIcon, |
16 | | - HelpIcon, |
17 | | - LinearIcon, |
18 | 13 | Link, |
19 | 14 | LogOutIcon, |
20 | | - MonitorIcon, |
21 | | - UserCircleIcon, |
22 | | - ZapierIcon |
| 15 | + UserCircleIcon |
| 16 | + // HelpIcon, |
| 17 | + // LinearIcon, |
| 18 | + // MonitorIcon, |
| 19 | + // ZapierIcon, |
| 20 | + // FigmaOutlineIcon, |
| 21 | + // CalendarIcon, |
| 22 | + // CodeIcon, |
| 23 | + // AccessIcon, |
| 24 | + // AppsIcon |
23 | 25 | } from '@gitmono/ui' |
24 | 26 | import { DropdownMenu } from '@gitmono/ui/DropdownMenu' |
25 | 27 | import { buildMenuItems } from '@gitmono/ui/Menu' |
26 | | -import { useIsDesktopApp } from '@gitmono/ui/src/hooks' |
27 | 28 |
|
28 | 29 | import { NotificationPauseCalendarDialog } from '@/components/NotificationPause/NotificationPauseCalendarDialog' |
29 | 30 | import { NotificationScheduleDialog } from '@/components/NotificationPause/NotificationScheduleDialog' |
@@ -62,7 +63,7 @@ export function ProfileDropdown({ |
62 | 63 | const { scope } = useScope() |
63 | 64 | const { data: currentUser } = useGetCurrentUser() |
64 | 65 | const signout = useSignoutUser() |
65 | | - const isDesktop = useIsDesktopApp() |
| 66 | + // const isDesktop = useIsDesktopApp() |
66 | 67 | const isStaff = useCurrentUserIsStaff() |
67 | 68 | const [open, setOpen] = useState(false) |
68 | 69 | const [notificationPauseCalendarDialogOpen, setNotificationPauseCalendarDialogOpen] = useState(false) |
@@ -90,73 +91,73 @@ export function ProfileDropdown({ |
90 | 91 | }, |
91 | 92 | pauseNotificationsMenuItem, |
92 | 93 | { type: 'separator' }, |
93 | | - { |
94 | | - type: 'item', |
95 | | - label: 'Support', |
96 | | - leftSlot: <HelpIcon />, |
97 | | - url: `mailto:support@gitmono.com` |
98 | | - }, |
99 | | - { type: 'separator' }, |
100 | | - !isMobile && { |
101 | | - type: 'sub', |
102 | | - label: 'Apps & integrations', |
103 | | - leftSlot: <AppsIcon />, |
104 | | - items: buildMenuItems([ |
105 | | - !isDesktop && { |
106 | | - type: 'item', |
107 | | - label: 'Desktop app', |
108 | | - leftSlot: <MonitorIcon />, |
109 | | - external: true, |
110 | | - url: `${SITE_URL}/desktop/download` |
111 | | - }, |
112 | | - { |
113 | | - type: 'item', |
114 | | - label: 'Linear', |
115 | | - leftSlot: <LinearIcon />, |
116 | | - external: true, |
117 | | - url: 'https://linear.app/integrations/campsite' |
118 | | - }, |
119 | | - { |
120 | | - type: 'item', |
121 | | - label: 'Zapier', |
122 | | - leftSlot: <ZapierIcon />, |
123 | | - external: true, |
124 | | - url: 'https://zapier.com/apps/campsite/integrations' |
125 | | - }, |
126 | | - { |
127 | | - type: 'item', |
128 | | - label: 'Figma', |
129 | | - leftSlot: <FigmaOutlineIcon />, |
130 | | - external: true, |
131 | | - url: `${SITE_URL}/figma/plugin` |
132 | | - }, |
133 | | - { |
134 | | - type: 'item', |
135 | | - label: 'Cal.com', |
136 | | - leftSlot: <CalendarIcon />, |
137 | | - external: true, |
138 | | - url: 'https://app.cal.com/apps/campsite' |
139 | | - }, |
140 | | - { |
141 | | - type: 'item', |
142 | | - label: 'API', |
143 | | - leftSlot: <CodeIcon />, |
144 | | - external: true, |
145 | | - url: 'https://developers.campsite.com' |
146 | | - } |
147 | | - ]) |
148 | | - }, |
149 | | - !isMobile && { type: 'separator' }, |
150 | | - isStaff && { |
151 | | - type: 'item', |
152 | | - label: 'Feature flags', |
153 | | - leftSlot: <AccessIcon />, |
154 | | - external: true, |
155 | | - url: |
156 | | - !process.env.NODE_ENV || process.env.NODE_ENV === 'development' |
157 | | - ? 'http://admin.gitmega.com/admin/features/' |
158 | | - : 'https://admin.campsite.com/admin/features' |
159 | | - }, |
| 94 | + // { |
| 95 | + // type: 'item', |
| 96 | + // label: 'Support', |
| 97 | + // leftSlot: <HelpIcon />, |
| 98 | + // url: `mailto:support@gitmono.com` |
| 99 | + // }, |
| 100 | + // { type: 'separator' }, |
| 101 | + // !isMobile && { |
| 102 | + // type: 'sub', |
| 103 | + // label: 'Apps & integrations', |
| 104 | + // leftSlot: <AppsIcon />, |
| 105 | + // items: buildMenuItems([ |
| 106 | + // !isDesktop && { |
| 107 | + // type: 'item', |
| 108 | + // label: 'Desktop app', |
| 109 | + // leftSlot: <MonitorIcon />, |
| 110 | + // external: true, |
| 111 | + // url: `${SITE_URL}/desktop/download` |
| 112 | + // }, |
| 113 | + // { |
| 114 | + // type: 'item', |
| 115 | + // label: 'Linear', |
| 116 | + // leftSlot: <LinearIcon />, |
| 117 | + // external: true, |
| 118 | + // url: 'https://linear.app/integrations/campsite' |
| 119 | + // }, |
| 120 | + // { |
| 121 | + // type: 'item', |
| 122 | + // label: 'Zapier', |
| 123 | + // leftSlot: <ZapierIcon />, |
| 124 | + // external: true, |
| 125 | + // url: 'https://zapier.com/apps/campsite/integrations' |
| 126 | + // }, |
| 127 | + // { |
| 128 | + // type: 'item', |
| 129 | + // label: 'Figma', |
| 130 | + // leftSlot: <FigmaOutlineIcon />, |
| 131 | + // external: true, |
| 132 | + // url: `${SITE_URL}/figma/plugin` |
| 133 | + // }, |
| 134 | + // { |
| 135 | + // type: 'item', |
| 136 | + // label: 'Cal.com', |
| 137 | + // leftSlot: <CalendarIcon />, |
| 138 | + // external: true, |
| 139 | + // url: 'https://app.cal.com/apps/campsite' |
| 140 | + // }, |
| 141 | + // { |
| 142 | + // type: 'item', |
| 143 | + // label: 'API', |
| 144 | + // leftSlot: <CodeIcon />, |
| 145 | + // external: true, |
| 146 | + // url: 'https://developers.campsite.com' |
| 147 | + // } |
| 148 | + // ]) |
| 149 | + // }, |
| 150 | + // !isMobile && { type: 'separator' }, |
| 151 | + // isStaff && { |
| 152 | + // type: 'item', |
| 153 | + // label: 'Feature flags', |
| 154 | + // leftSlot: <AccessIcon />, |
| 155 | + // external: true, |
| 156 | + // url: |
| 157 | + // !process.env.NODE_ENV || process.env.NODE_ENV === 'development' |
| 158 | + // ? 'http://admin.gitmega.com/admin/features/' |
| 159 | + // : 'https://admin.campsite.com/admin/features' |
| 160 | + // }, |
160 | 161 | isStaff && { type: 'separator' }, |
161 | 162 | { |
162 | 163 | type: 'item', |
|
0 commit comments