DeployEdgeFunctionWarningModal.tsx34 lines · main
| 1 | import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal' |
| 2 | |
| 3 | interface DeployEdgeFunctionWarningModalProps { |
| 4 | visible: boolean |
| 5 | onCancel: () => void |
| 6 | onConfirm: () => void |
| 7 | isDeploying: boolean |
| 8 | } |
| 9 | |
| 10 | export const DeployEdgeFunctionWarningModal = ({ |
| 11 | visible, |
| 12 | onCancel, |
| 13 | onConfirm, |
| 14 | isDeploying, |
| 15 | }: DeployEdgeFunctionWarningModalProps) => { |
| 16 | return ( |
| 17 | <ConfirmationModal |
| 18 | visible={visible} |
| 19 | size="medium" |
| 20 | title="Confirm to deploy updates" |
| 21 | confirmLabel="Deploy updates" |
| 22 | confirmLabelLoading="Deploying updates" |
| 23 | variant="warning" |
| 24 | loading={isDeploying} |
| 25 | onCancel={onCancel} |
| 26 | onConfirm={onConfirm} |
| 27 | > |
| 28 | <p className="text-sm text-foreground-light"> |
| 29 | Deploying will immediately update your live Edge Function for this project and cannot be |
| 30 | rolled back automatically. Are you sure you want to deploy the changes? |
| 31 | </p> |
| 32 | </ConfirmationModal> |
| 33 | ) |
| 34 | } |