import { DeleteIcon, EmailIcon } from '@chakra-ui/icons' import { IconButton, Spinner, Table, TableContainer, Tbody, Td, Th, Thead, Tooltip, Tr, } from '@chakra-ui/react' import { useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { sendSMSRequest } from '../../services' import { selectAuth } from '../../store/authReducer' import { fetchDeviceList, selectDeviceList, } from '../../store/deviceListReducer' const DeviceList = () => { const dispatch = useDispatch() const { user, accessToken } = useSelector(selectAuth) useEffect(() => { if (user && accessToken) { dispatch(fetchDeviceList()) } }, [user, accessToken, dispatch]) const { data, loading } = useSelector(selectDeviceList) const onDelete = (apiKeyId: string) => {} return ( {loading ? ( ) : ( <> {data.length === 0 ? ( ) : ( data.map(({ _id, brand, model, enabled, createdAt }) => ( )) )} )}
Your Devices Status Actions
No Devices
{`${brand}/ ${model}`} {enabled ? 'enabled' : 'disabled'} {/* {}} /> */} } onDoubleClick={(e) => {}} />
) } export default DeviceList