File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
apps/frontend/src/components/layout Expand file tree Collapse file tree 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';
2121import { PublicComponent } from '@gitroom/frontend/components/public-api/public.component' ;
2222import Link from 'next/link' ;
2323import { Webhooks } from '@gitroom/frontend/components/webhooks/webhooks' ;
24+ import { TopTitle } from '@gitroom/frontend/components/launches/helpers/top.title.component' ;
2425
2526export const SettingsPopup : FC < { getRef ?: Ref < any > } > = ( props ) => {
2627 const { isGeneral } = useVariables ( ) ;
@@ -210,8 +211,30 @@ export const SettingsPopup: FC<{ getRef?: Ref<any> }> = (props) => {
210211} ;
211212
212213export 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+
213236 return (
214- < Link href = "/settings" >
237+ < Link href = "/settings" onClick = { openModal } >
215238 < svg
216239 width = "40"
217240 height = "40"
Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ export const TopMenu: FC = () => {
7777 const user = useUser ( ) ;
7878 const { billingEnabled } = useVariables ( ) ;
7979 const menuItems = useMenuItems ( ) ;
80-
8180 return (
8281 < div className = "flex flex-col h-full animate-normalFadeDown order-3 md:order-2 col-span-2 md:col-span-1" >
8382 < 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