Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/remove version and features 936 #942

Merged
merged 2 commits into from
Oct 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 24 additions & 16 deletions webapp/src/components/InformationCard/NodeInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,37 @@ import clsx from 'clsx'
import Typography from '@mui/material/Typography'

const NodeInformation = ({ info, classes, t }) => {
if (!info?.version && !info?.features?.length && !info?.keys) {
return (
<div className={classes.borderLine}>
<Typography>{t('noData')}</Typography>
</div>
)
}

return (
<div className={classes.borderLine}>
<div className={classes.rowWrapper}>
<Typography variant="body1">
{`${t('version')}: ${info?.version || '- -'}`}
</Typography>
</div>
<div className={clsx(classes.rowWrapper, classes.boxLabel)}>
<div className="listLabel">
<Typography variant="body1">{`${t('features')}:`}</Typography>
{info?.version && (
<div className={classes.rowWrapper}>
<Typography variant="body1">
{`${t('version')}: ${info?.version}`}
</Typography>
</div>
<div className="listBox">
{Array.isArray(info?.features) && info.features.length > 0 ? (
info.features.map((feature) => (
)}
{Array.isArray(info?.features) && info.features.length > 0 && (
<div className={clsx(classes.rowWrapper, classes.boxLabel)}>
<div className="listLabel">
<Typography variant="body1">{`${t('features')}:`}</Typography>
</div>
<div className="listBox">
{info.features.map((feature) => (
<Typography key={feature} variant="body1">
{feature}
</Typography>
))
) : (
<Typography variant="body1">- -</Typography>
)}
))}
</div>
</div>
</div>
)}
{!!info?.keys && (
<div
className={clsx(
Expand Down