Removed test action.
This commit is contained in:
parent
c38ed74f21
commit
2b092cb846
@ -1,6 +1,6 @@
|
||||
import PropTypes from 'prop-types'
|
||||
import { useContext, useEffect, useState, useRef } from 'react'
|
||||
import { Input, Result, Typography, Flex, Progress, Button } from 'antd'
|
||||
import { Input, Result, Typography, Flex, Progress } from 'antd'
|
||||
import { LoadingOutlined } from '@ant-design/icons'
|
||||
import { ApiServerContext } from '../../context/ApiServerContext'
|
||||
import CopyButton from '../../common/CopyButton'
|
||||
@ -9,7 +9,7 @@ import OTPIcon from '../../../Icons/OTPIcon'
|
||||
const { Text } = Typography
|
||||
|
||||
const HostOTP = ({ id }) => {
|
||||
const { fetchHostOTP, sendObjectAction } = useContext(ApiServerContext)
|
||||
const { fetchHostOTP } = useContext(ApiServerContext)
|
||||
const [hostObject, setHostObject] = useState(null)
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [timeRemaining, setTimeRemaining] = useState(0)
|
||||
@ -35,13 +35,6 @@ const HostOTP = ({ id }) => {
|
||||
})
|
||||
}
|
||||
|
||||
const sendTestAction = () => {
|
||||
console.log('Sending test action...')
|
||||
sendObjectAction(id, 'host', { method: 'testMethod' }, (result) => {
|
||||
console.log('Got callback', result)
|
||||
})
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (hostObject === null && initialized == false) {
|
||||
setInitialized(true)
|
||||
@ -85,7 +78,6 @@ const HostOTP = ({ id }) => {
|
||||
|
||||
return (
|
||||
<Flex vertical align='center'>
|
||||
<Button onClick={sendTestAction}>Test Action</Button>
|
||||
<Result
|
||||
title={'Connect a Host.'}
|
||||
subTitle={<Text>Enter the following one time passcode.</Text>}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user