import { ModalContainer, ModalTitle, ModalContent, ModalText, ButtonContainer } from "../style" import { useModalContext } from "../../../store" import { useIpStore } from "../../../store" import { MainButton } from "../../UI/buttons/mainButton" import {useState} from "react"; import {NetworkService} from "../../../api/request"; import RouterLoader from "../../UI/routerLoader"; import {useTheme} from "styled-components"; type Props={ address: string, onClose: () => void } export const DisconnectConfirm = ({address, onClose}: Props)=>{ const { ipAddress } = useIpStore(); const theme = useTheme() const [isLoading, setIsLoading] = useState(false); const handleDisconnect = async () => { try { setIsLoading(true); const res = await NetworkService.disconnectNetwork(ipAddress, address); if(res.status === 200) { onClose() } } catch (error) { console.error('Error connection:', error); }finally { setIsLoading(false); } }; return(

Отключение от Wi-Fi сети

Подтверждение отключения

Вы собираетесь отключиться от сети "{address}". Все активные подключения будут прерваны.

{isLoading && }
) }