import { useParams } from 'common' import { Button, Modal } from 'ui' import InformationBox from '@/components/ui/InformationBox' import { useNetworkRestrictionsApplyMutation } from '@/data/network-restrictions/network-retrictions-apply-mutation' interface DisallowAllModalProps { visible: boolean onClose: () => void } const DisallowAllModal = ({ visible, onClose }: DisallowAllModalProps) => { const { ref } = useParams() const { mutate: applyNetworkRestrictions, isPending: isApplying } = useNetworkRestrictionsApplyMutation({ onSuccess: () => onClose() }) const onSubmit = async () => { if (!ref) return console.error('Project ref is required') await applyNetworkRestrictions({ projectRef: ref, dbAllowedCidrs: [], dbAllowedCidrsV6: [], }) } return (

This will prevent any external IP addresses from accessing your project's database. Are you sure?

) } export default DisallowAllModal