@@ -30,7 +30,7 @@ import 'dayjs/locale/ar';
30
30
import 'dayjs/locale/tr' ;
31
31
import 'dayjs/locale/vi' ;
32
32
import localizedFormat from 'dayjs/plugin/localizedFormat' ;
33
- import { useModals } from '@mantine/modals ' ;
33
+ import { useModals } from '@gitroom/frontend/components/layout/new-modal ' ;
34
34
import clsx from 'clsx' ;
35
35
import { useFetch } from '@gitroom/helpers/utils/custom.fetch' ;
36
36
import { ExistingDataContextProvider } from '@gitroom/frontend/components/launches/helpers/use.existing.data' ;
@@ -215,7 +215,8 @@ export const WeekView = () => {
215
215
< div
216
216
className = { clsx (
217
217
'text-[14px] font-[600] flex items-center justify-center gap-[6px]' ,
218
- day . day === newDayjs ( ) . format ( 'L' ) && 'text-newTableTextFocused'
218
+ day . day === newDayjs ( ) . format ( 'L' ) &&
219
+ 'text-newTableTextFocused'
219
220
) }
220
221
>
221
222
{ day . day === newDayjs ( ) . format ( 'L' ) && (
@@ -391,7 +392,9 @@ export const CalendarColumn: FC<{
391
392
392
393
const isBeforeNow = useMemo ( ( ) => {
393
394
const originalUtc = getDate . startOf ( 'hour' ) ;
394
- return originalUtc . startOf ( 'hour' ) . isBefore ( newDayjs ( ) . startOf ( 'hour' ) . utc ( ) ) ;
395
+ return originalUtc
396
+ . startOf ( 'hour' )
397
+ . isBefore ( newDayjs ( ) . startOf ( 'hour' ) . utc ( ) ) ;
395
398
} , [ getDate , num ] ) ;
396
399
397
400
const { start, stop } = useInterval (
@@ -462,8 +465,10 @@ export const CalendarColumn: FC<{
462
465
: Fragment ;
463
466
modal . openModal ( {
464
467
closeOnClickOutside : false ,
468
+ removeLayout : true ,
465
469
closeOnEscape : false ,
466
470
withCloseButton : false ,
471
+ askClose : true ,
467
472
classNames : {
468
473
modal : 'w-[100%] max-w-[1400px] text-textColor' ,
469
474
} ,
@@ -515,28 +520,24 @@ export const CalendarColumn: FC<{
515
520
? undefined
516
521
: await new Promise ( ( resolve ) => {
517
522
modal . openModal ( {
518
- title : '' ,
523
+ title : t ( 'select_set' , 'Select a Set' ) ,
519
524
closeOnClickOutside : true ,
525
+ askClose : true ,
520
526
closeOnEscape : true ,
521
- withCloseButton : false ,
527
+ withCloseButton : true ,
522
528
onClose : ( ) => resolve ( 'exit' ) ,
523
- classNames : {
524
- modal : 'text-textColor' ,
525
- } ,
526
529
children : (
527
- < ModalWrapperComponent title = { t ( 'select_set' , 'Select a Set' ) } >
528
- < SetSelectionModal
529
- sets = { sets }
530
- onSelect = { ( selectedSet ) => {
531
- resolve ( selectedSet ) ;
532
- modal . closeAll ( ) ;
533
- } }
534
- onContinueWithoutSet = { ( ) => {
535
- resolve ( undefined ) ;
536
- modal . closeAll ( ) ;
537
- } }
538
- />
539
- </ ModalWrapperComponent >
530
+ < SetSelectionModal
531
+ sets = { sets }
532
+ onSelect = { ( selectedSet ) => {
533
+ resolve ( selectedSet ) ;
534
+ modal . closeAll ( ) ;
535
+ } }
536
+ onContinueWithoutSet = { ( ) => {
537
+ resolve ( undefined ) ;
538
+ modal . closeAll ( ) ;
539
+ } }
540
+ />
540
541
) ,
541
542
} ) ;
542
543
} ) ;
@@ -547,6 +548,8 @@ export const CalendarColumn: FC<{
547
548
closeOnClickOutside : false ,
548
549
closeOnEscape : false ,
549
550
withCloseButton : false ,
551
+ removeLayout : true ,
552
+ askClose : true ,
550
553
classNames : {
551
554
modal : 'w-[100%] max-w-[1400px] text-textColor' ,
552
555
} ,
@@ -586,17 +589,14 @@ export const CalendarColumn: FC<{
586
589
const openStatistics = useCallback (
587
590
( id : string ) => ( ) => {
588
591
modal . openModal ( {
592
+ title : t ( 'statistics' , 'Statistics' ) ,
589
593
closeOnClickOutside : true ,
590
594
closeOnEscape : true ,
591
595
withCloseButton : false ,
592
596
classNames : {
593
597
modal : 'w-[100%] max-w-[1400px]' ,
594
598
} ,
595
- children : (
596
- < ModalWrapperComponent title = { t ( 'statistics' , 'Statistics' ) } >
597
- < StatisticsModal postId = { id } />
598
- </ ModalWrapperComponent >
599
- ) ,
599
+ children : < StatisticsModal postId = { id } /> ,
600
600
size : '80%' ,
601
601
// title: `Adding posts for ${getDate.format('DD/MM/YYYY HH:mm')}`,
602
602
} ) ;
0 commit comments