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

This will allow any IP address to access your project's database. Are you sure?

) } export default AllowAllModal