File tree 2 files changed +24
-2
lines changed
apps/frontend/src/components/layout
2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import { useVariables } from '@gitroom/react/helpers/variable.context';
21
21
import { PublicComponent } from '@gitroom/frontend/components/public-api/public.component' ;
22
22
import Link from 'next/link' ;
23
23
import { Webhooks } from '@gitroom/frontend/components/webhooks/webhooks' ;
24
+ import { TopTitle } from '@gitroom/frontend/components/launches/helpers/top.title.component' ;
24
25
25
26
export const SettingsPopup : FC < { getRef ?: Ref < any > } > = ( props ) => {
26
27
const { isGeneral } = useVariables ( ) ;
@@ -210,8 +211,30 @@ export const SettingsPopup: FC<{ getRef?: Ref<any> }> = (props) => {
210
211
} ;
211
212
212
213
export const SettingsComponent = ( ) => {
214
+ const settings = useModals ( ) ;
215
+ const user = useUser ( ) ;
216
+
217
+ const openModal = useCallback ( ( ) => {
218
+ if ( user ?. tier . current !== 'FREE' ) {
219
+ return ;
220
+ }
221
+
222
+ settings . openModal ( {
223
+ children : (
224
+ < div className = "relative flex gap-[20px] flex-col flex-1 rounded-[4px] border border-customColor6 bg-sixth p-[16px] w-[500px] mx-auto" >
225
+ < SettingsPopup />
226
+ </ div >
227
+ ) ,
228
+ classNames : {
229
+ modal : 'bg-transparent text-textColor' ,
230
+ } ,
231
+ withCloseButton : false ,
232
+ size : '100%' ,
233
+ } ) ;
234
+ } , [ user ] ) ;
235
+
213
236
return (
214
- < Link href = "/settings" >
237
+ < Link href = "/settings" onClick = { openModal } >
215
238
< svg
216
239
width = "40"
217
240
height = "40"
Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ export const TopMenu: FC = () => {
77
77
const user = useUser ( ) ;
78
78
const { billingEnabled } = useVariables ( ) ;
79
79
const menuItems = useMenuItems ( ) ;
80
-
81
80
return (
82
81
< div className = "flex flex-col h-full animate-normalFadeDown order-3 md:order-2 col-span-2 md:col-span-1" >
83
82
< ul className = "gap-0 md:gap-5 flex flex-1 items-center text-[18px]" >
You can’t perform that action at this time.
0 commit comments