Skip to content

Commit d4f18d1

Browse files
committed
HOT FIX
1 parent 74b84b5 commit d4f18d1

File tree

5 files changed

+38
-21
lines changed

5 files changed

+38
-21
lines changed

apps/frontend/src/components/launches/calendar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,16 +548,16 @@ export const CalendarColumn: FC<{
548548
if (set === 'exit') return;
549549

550550
modal.openModal({
551+
id: 'add-edit-modal',
551552
closeOnClickOutside: false,
553+
removeLayout: true,
552554
closeOnEscape: false,
553555
withCloseButton: false,
554-
removeLayout: true,
555-
fullScreen: true,
556556
askClose: true,
557+
fullScreen: true,
557558
classNames: {
558-
modal: 'fixed left-0 top-0 w-full h-full',
559+
modal: 'w-[100%] max-w-[1400px] text-textColor',
559560
},
560-
id: 'add-edit-modal',
561561
children: (
562562
<AddEditModal
563563
allIntegrations={integrations.map((p) => ({

apps/frontend/src/components/launches/generator/generator.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,16 @@ const FirstStep: FC = (props) => {
150150
});
151151
setShowStep('');
152152
modal.openModal({
153+
id: 'add-edit-modal',
153154
closeOnClickOutside: false,
155+
removeLayout: true,
154156
closeOnEscape: false,
155157
withCloseButton: false,
156-
removeLayout: true,
157158
askClose: true,
159+
fullScreen: true,
158160
classNames: {
159-
modal: 'w-[100%] max-w-[1400px] bg-transparent text-textColor',
161+
modal: 'w-[100%] max-w-[1400px] text-textColor',
160162
},
161-
id: 'add-edit-modal',
162163
children: (
163164
<AddEditModal
164165
allIntegrations={integrations.map((p) => ({

apps/frontend/src/components/launches/menu/menu.tsx

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
'use client';
22

33
import React, {
4-
FC, MouseEventHandler, useCallback, useLayoutEffect, useMemo, useRef, useState
4+
FC,
5+
MouseEventHandler,
6+
useCallback,
7+
useLayoutEffect,
8+
useMemo,
9+
useRef,
10+
useState,
511
} from 'react';
612
import { useClickOutside } from '@mantine/hooks';
713
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
@@ -56,7 +62,7 @@ export const Menu: FC<{
5662
const { integrations, reloadCalendarView } = useCalendar();
5763
const toast = useToaster();
5864
const modal = useModals();
59-
const [show, setShow] = useState<false | {x: number, y: number}>(false);
65+
const [show, setShow] = useState<false | { x: number; y: number }>(false);
6066
const menuRef = useRef<HTMLDivElement>(null);
6167
const ref = useClickOutside<HTMLDivElement>(() => {
6268
setShow(false);
@@ -69,13 +75,16 @@ export const Menu: FC<{
6975
const menuRect = menuRef.current.getBoundingClientRect();
7076
const viewportHeight = window.innerHeight;
7177
const padding = 10;
72-
78+
7379
// Check if menu overflows bottom of viewport
7480
if (menuRect.bottom > viewportHeight - padding) {
75-
const newY = Math.max(padding, viewportHeight - menuRect.height - padding);
81+
const newY = Math.max(
82+
padding,
83+
viewportHeight - menuRect.height - padding
84+
);
7685
// Only update if position actually changed significantly to avoid infinite loop
7786
if (Math.abs(show.y - newY) > 1) {
78-
setShow(prev => prev ? { ...prev, y: newY } : false);
87+
setShow((prev) => (prev ? { ...prev, y: newY } : false));
7988
}
8089
}
8190
}
@@ -88,7 +97,11 @@ export const Menu: FC<{
8897
e.stopPropagation();
8998
// @ts-ignore
9099
const boundBox = showRef?.current?.getBoundingClientRect();
91-
setShow(show ? false : { x: boundBox?.left, y: boundBox?.top + boundBox?.height });
100+
setShow(
101+
show
102+
? false
103+
: { x: boundBox?.left, y: boundBox?.top + boundBox?.height }
104+
);
92105
},
93106
[show]
94107
);
@@ -184,15 +197,16 @@ export const Menu: FC<{
184197
).json();
185198

186199
modal.openModal({
200+
id: 'add-edit-modal',
187201
closeOnClickOutside: false,
202+
removeLayout: true,
188203
closeOnEscape: false,
189204
withCloseButton: false,
190-
removeLayout: true,
191205
askClose: true,
206+
fullScreen: true,
192207
classNames: {
193-
modal: 'w-[100%] max-w-[1400px] bg-transparent text-textColor',
208+
modal: 'w-[100%] max-w-[1400px] text-textColor',
194209
},
195-
id: 'add-edit-modal',
196210
children: (
197211
<AddEditModal
198212
allIntegrations={integrations.map((p) => ({
@@ -329,7 +343,7 @@ export const Menu: FC<{
329343
<div
330344
ref={menuRef}
331345
onClick={(e) => e.stopPropagation()}
332-
style={{left: show.x, top: show.y}}
346+
style={{ left: show.x, top: show.y }}
333347
className={`fixed p-[12px] bg-newBgColorInner shadow-menu flex flex-col gap-[16px] z-[100] rounded-[8px] border border-tableBorder text-nowrap`}
334348
>
335349
{canDisable && !findIntegration?.refreshNeeded && (

apps/frontend/src/components/launches/new.post.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,16 @@ export const NewPost = () => {
4848
if (set === 'exit') return;
4949

5050
modal.openModal({
51+
id: 'add-edit-modal',
5152
closeOnClickOutside: false,
53+
removeLayout: true,
5254
closeOnEscape: false,
5355
withCloseButton: false,
54-
removeLayout: true,
5556
askClose: true,
57+
fullScreen: true,
5658
classNames: {
57-
modal: 'w-[100%] max-w-[1400px] bg-transparent text-textColor',
59+
modal: 'w-[100%] max-w-[1400px] text-textColor',
5860
},
59-
id: 'add-edit-modal',
6061
children: (
6162
<AddEditModal
6263
allIntegrations={integrations.map((p) => ({

apps/frontend/src/components/sets/sets.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,16 @@ export const Sets: FC = () => {
9393
const addSet = useCallback(
9494
(params?: { id?: string; name?: string; content?: string }) => () => {
9595
modal.openModal({
96+
id: 'add-edit-modal',
9697
closeOnClickOutside: false,
9798
removeLayout: true,
9899
closeOnEscape: false,
99100
withCloseButton: false,
101+
askClose: true,
100102
fullScreen: true,
101103
classNames: {
102104
modal: 'w-[100%] max-w-[1400px] text-textColor',
103105
},
104-
id: 'add-edit-modal',
105106
children: (
106107
<AddEditModal
107108
allIntegrations={integrations.map((p: any) => ({

0 commit comments

Comments
 (0)