Skip to content

Commit cde0550

Browse files
committed
feat: fix precondition
1 parent 4e90385 commit cde0550

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/frontend/src/components/layout/pre-condition.component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useModals } from '@gitroom/frontend/components/layout/new-modal';
55
import { Button } from '@gitroom/react/form/button';
66

77
export const PreConditionComponentModal: FC = () => {
8+
const modal = useModals();
89
return (
910
<div className="flex flex-col gap-[16px]">
1011
<div className="whitespace-pre-line">
@@ -21,7 +22,7 @@ export const PreConditionComponentModal: FC = () => {
2122
>
2223
Fast track - Charge me now
2324
</Button>
24-
<Button secondary={true}>Cancel</Button>
25+
<Button onClick={modal.closeCurrent} secondary={true}>Cancel</Button>
2526
</div>
2627
</div>
2728
);
@@ -33,11 +34,10 @@ export const PreConditionComponent: FC = () => {
3334
if (query.get('precondition')) {
3435
modal.openModal({
3536
title: 'Suspicious activity detected',
36-
withCloseButton: false,
37+
withCloseButton: true,
3738
classNames: {
3839
modal: 'text-textColor',
3940
},
40-
size: 'auto',
4141
children: <PreConditionComponentModal />,
4242
});
4343
}

0 commit comments

Comments
 (0)