Skip to content

Commit d51196c

Browse files
committed
feat: settings
1 parent d7764fa commit d51196c

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

apps/frontend/src/components/layout/settings.component.tsx

+24-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { useVariables } from '@gitroom/react/helpers/variable.context';
2121
import { PublicComponent } from '@gitroom/frontend/components/public-api/public.component';
2222
import Link from 'next/link';
2323
import { Webhooks } from '@gitroom/frontend/components/webhooks/webhooks';
24+
import { TopTitle } from '@gitroom/frontend/components/launches/helpers/top.title.component';
2425

2526
export 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

212213
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+
213236
return (
214-
<Link href="/settings">
237+
<Link href="/settings" onClick={openModal}>
215238
<svg
216239
width="40"
217240
height="40"

apps/frontend/src/components/layout/top.menu.tsx

-1
Original file line numberDiff line numberDiff 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]">

0 commit comments

Comments
 (0)