feat(pair device): add navigation to next screen

This commit is contained in:
Hristo Nedelkov 2024-03-18 13:31:00 +02:00
parent ef7f66b1ed
commit 3e59f86811

View File

@ -14,6 +14,7 @@ import Header from '../../components/General/Header'
import ConnectViaIP from './ConnectViaIP/ConnectViaIP' import ConnectViaIP from './ConnectViaIP/ConnectViaIP'
import { RootState } from '../../redux/store' import { RootState } from '../../redux/store'
import { isAddressValid, isPortValid } from '../../utilities' import { isAddressValid, isPortValid } from '../../utilities'
import { useNavigate } from 'react-router-dom'
const PairDevice = () => { const PairDevice = () => {
const [isAwaitingPairing, setIsAwaitingPairing] = useState(false) const [isAwaitingPairing, setIsAwaitingPairing] = useState(false)
@ -27,6 +28,7 @@ const PairDevice = () => {
vcAddress, vcAddress,
vcPort, vcPort,
} = useSelector((state: RootState) => state.pairDevice) } = useSelector((state: RootState) => state.pairDevice)
const navigate = useNavigate()
const isPaired = false const isPaired = false
const isPairing = false const isPairing = false
@ -38,7 +40,9 @@ const PairDevice = () => {
setIsConnectingViaIp(state => !state) setIsConnectingViaIp(state => !state)
} }
const continueHandler = () => {} const continueHandler = (e: Event) => {
navigate('/device-health-check')
}
const isDisabledButton = () => { const isDisabledButton = () => {
if (isConnectingViaIp) { if (isConnectingViaIp) {