diff --git a/webapp/public/empty-states/Error.webp b/webapp/public/empty-states/Error.webp index 1c08de7c..b15c83cb 100644 Binary files a/webapp/public/empty-states/Error.webp and b/webapp/public/empty-states/Error.webp differ diff --git a/webapp/src/components/InformationCard/styles.js b/webapp/src/components/InformationCard/styles.js index 45a3f95f..c289e6a3 100644 --- a/webapp/src/components/InformationCard/styles.js +++ b/webapp/src/components/InformationCard/styles.js @@ -7,19 +7,22 @@ export default (theme) => ({ '& .MuiCardHeader-title': { textTransform: 'lowercase', }, + '& .MuiCardHeader-root': { + padding: theme.spacing(2,4,0), + }, [theme.breakpoints.up('sm')]: { width: 300, }, [theme.breakpoints.up('lg')]: { width: '100%', - paddingBottom: theme.spacing(2), + paddingBottom: theme.spacing(4), }, }, wrapper: { display: 'flex', flexDirection: 'column', width: '100%', - padding: theme.spacing(0, 4, 4, 4), + padding: theme.spacing(0, 4, 0), '& .MuiTypography-overline': { marginLeft: 0, fontWeight: '700', diff --git a/webapp/src/components/NodeCard/NodesCard.js b/webapp/src/components/NodeCard/NodesCard.js index 0e536221..d637eb22 100644 --- a/webapp/src/components/NodeCard/NodesCard.js +++ b/webapp/src/components/NodeCard/NodesCard.js @@ -6,6 +6,7 @@ import { makeStyles } from '@mui/styles' import { useSubscription } from '@apollo/client' import CardHeader from '@mui/material/CardHeader' import CardContent from '@mui/material/CardContent' +import Chip from '@mui/material/Chip' import 'flag-icon-css/css/flag-icons.css' import { BLOCK_TRANSACTIONS_HISTORY } from '../../gql' @@ -75,13 +76,23 @@ const NodesCard = ({ nodes }) => { return ( <> - + {node?.node_info[0]?.version && ( +
+
{t('nodeVersion')}
+ +
+ )} - {node.type.includes('query') && } + diff --git a/webapp/src/components/NodeCard/SupportedAPIs.js b/webapp/src/components/NodeCard/SupportedAPIs.js index cc64dc28..817e0288 100644 --- a/webapp/src/components/NodeCard/SupportedAPIs.js +++ b/webapp/src/components/NodeCard/SupportedAPIs.js @@ -1,8 +1,7 @@ -import React, { useEffect, useState } from 'react' +import React, { useState } from 'react' import { useTranslation } from 'react-i18next' import { makeStyles } from '@mui/styles' import Button from '@mui/material/Button' -import axios from 'axios' import ChipList from '../ChipList' import Tooltip from '../Tooltip' @@ -11,10 +10,9 @@ import styles from './styles' const useStyles = makeStyles(styles) -const SupportedAPIs = ({ node }) => { +const SupportedAPIs = ({ list }) => { const classes = useStyles() const { t } = useTranslation('nodeCardComponent') - const [APIs, setAPIs] = useState([]) const [anchorEl, setAnchorEl] = useState(null) const handlePopoverOpen = (target) => { @@ -25,42 +23,15 @@ const SupportedAPIs = ({ node }) => { setAnchorEl(null) } - useEffect(() => { - const getAPIs = async () => { - let api = '' - - for (let i = 0; i < node.endpoints.length; i++) { - const endpoint = node.endpoints[i] - - if (endpoint.type === 'ssl') { - api = endpoint.value - break - } - } - - try { - const { data } = await axios.get(`${api}/v1/node/get_supported_apis`, { - mode: 'cors', - }) - - if (data.apis && Array.isArray(data.apis)) { - setAPIs(data.apis) - } - } catch (error) {} - } - - getAPIs() - }, [node.endpoints]) - return ( - !!APIs.length && ( + !!list?.length && ( <> - +