mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-20 18:40:17 -04:00
Add defaults when no tags
This commit is contained in:
parent
78170f7553
commit
6eaf4e3729
|
@ -106,7 +106,11 @@ export default function ResourceTable({ data, setData }: ResourceTableProps) {
|
||||||
),
|
),
|
||||||
cell: (info) => (
|
cell: (info) => (
|
||||||
<div className="flex flex-wrap gap-2 items-center px-2">
|
<div className="flex flex-wrap gap-2 items-center px-2">
|
||||||
<Tag>{info.getValue()}</Tag>
|
<Tag>
|
||||||
|
{info.getValue().length != 0
|
||||||
|
? info.getValue()
|
||||||
|
: "no program"}
|
||||||
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -115,7 +115,11 @@ export default function ServiceTable({ data, setData }: ServiceTableProps) {
|
||||||
),
|
),
|
||||||
cell: (info) => (
|
cell: (info) => (
|
||||||
<div className="flex flex-wrap gap-2 items-center px-2">
|
<div className="flex flex-wrap gap-2 items-center px-2">
|
||||||
<Tag>{info.getValue()}</Tag>
|
<Tag>
|
||||||
|
{info.getValue().length != 0
|
||||||
|
? info.getValue()
|
||||||
|
: "no program"}
|
||||||
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
@ -128,9 +132,13 @@ export default function ServiceTable({ data, setData }: ServiceTableProps) {
|
||||||
),
|
),
|
||||||
cell: (info) => (
|
cell: (info) => (
|
||||||
<div className="flex flex-wrap gap-2 items-center px-2">
|
<div className="flex flex-wrap gap-2 items-center px-2">
|
||||||
{info.getValue().map((tag: string, index: number) => {
|
{info.getValue().length > 0 ? (
|
||||||
|
info.getValue().map((tag: string, index: number) => {
|
||||||
return <Tag key={index}>{tag}</Tag>;
|
return <Tag key={index}>{tag}</Tag>;
|
||||||
})}
|
})
|
||||||
|
) : (
|
||||||
|
<Tag>no requirements</Tag>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -97,8 +97,12 @@ export default function UserTable({ data, setData }: UserTableProps) {
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
cell: (info) => (
|
cell: (info) => (
|
||||||
<div className="flex ml-2 flex-wrap gap-2 items-center">
|
<div className="flex flex-wrap gap-2 items-center px-2">
|
||||||
<Tag>{info.getValue()}</Tag>
|
<Tag>
|
||||||
|
{info.getValue().length != 0
|
||||||
|
? info.getValue()
|
||||||
|
: "no role"}
|
||||||
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
@ -122,9 +126,13 @@ export default function UserTable({ data, setData }: UserTableProps) {
|
||||||
),
|
),
|
||||||
cell: (info) => (
|
cell: (info) => (
|
||||||
<div className="flex ml-2 flex-wrap gap-2 items-center">
|
<div className="flex ml-2 flex-wrap gap-2 items-center">
|
||||||
{info.getValue().map((tag: string, index: number) => {
|
{info.getValue().length > 0 ? (
|
||||||
|
info.getValue().map((tag: string, index: number) => {
|
||||||
return <Tag key={index}>{tag}</Tag>;
|
return <Tag key={index}>{tag}</Tag>;
|
||||||
})}
|
})
|
||||||
|
) : (
|
||||||
|
<Tag>no programs</Tag>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user