mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-11 07:36:36 -07:00
fix: fix compatibility for existing networks after supporting tags and capabilities
This commit is contained in:
parent
8f891747d6
commit
a813d05b3c
1 changed files with 5 additions and 4 deletions
|
@ -64,10 +64,11 @@ function MemberSettings({ member, network, handleChange }) {
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Paper style={{ padding: 20 }}>
|
<Paper style={{ padding: 20 }}>
|
||||||
{Object.entries(network["capabilitiesByName"]).length === 0
|
{Object.entries(network["capabilitiesByName"] || []).length ===
|
||||||
|
0
|
||||||
? "No capabilities defined"
|
? "No capabilities defined"
|
||||||
: ""}
|
: ""}
|
||||||
{Object.entries(network["capabilitiesByName"]).map(
|
{Object.entries(network["capabilitiesByName"] || []).map(
|
||||||
([capName, capId]) => (
|
([capName, capId]) => (
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
control={
|
control={
|
||||||
|
@ -97,14 +98,14 @@ function MemberSettings({ member, network, handleChange }) {
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="h5">Tags</Typography>
|
<Typography variant="h5">Tags</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
{Object.entries(network["tagsByName"]).length === 0 ? (
|
{Object.entries(network["tagsByName"] || []).length === 0 ? (
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Paper style={{ padding: 20 }}>No tags defined</Paper>
|
<Paper style={{ padding: 20 }}>No tags defined</Paper>
|
||||||
</Grid>
|
</Grid>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
{Object.entries(network["tagsByName"]).map(
|
{Object.entries(network["tagsByName"] || []).map(
|
||||||
([tagName, tagDetail]) => (
|
([tagName, tagDetail]) => (
|
||||||
<Grid item xs={12} sm={6} key={"tag-" + tagName}>
|
<Grid item xs={12} sm={6} key={"tag-" + tagName}>
|
||||||
<Tag
|
<Tag
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue