mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-09 14:00:15 -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) => (
|
||||
<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>
|
||||
),
|
||||
}),
|
||||
|
|
|
@ -115,7 +115,11 @@ export default function ServiceTable({ data, setData }: ServiceTableProps) {
|
|||
),
|
||||
cell: (info) => (
|
||||
<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>
|
||||
),
|
||||
}),
|
||||
|
@ -128,9 +132,13 @@ export default function ServiceTable({ data, setData }: ServiceTableProps) {
|
|||
),
|
||||
cell: (info) => (
|
||||
<div className="flex flex-wrap gap-2 items-center px-2">
|
||||
{info.getValue().map((tag: string, index: number) => {
|
||||
return <Tag key={index}>{tag}</Tag>;
|
||||
})}
|
||||
{info.getValue().length > 0 ? (
|
||||
info.getValue().map((tag: string, index: number) => {
|
||||
return <Tag key={index}>{tag}</Tag>;
|
||||
})
|
||||
) : (
|
||||
<Tag>no requirements</Tag>
|
||||
)}
|
||||
</div>
|
||||
),
|
||||
}),
|
||||
|
|
|
@ -97,8 +97,12 @@ export default function UserTable({ data, setData }: UserTableProps) {
|
|||
</>
|
||||
),
|
||||
cell: (info) => (
|
||||
<div className="flex ml-2 flex-wrap gap-2 items-center">
|
||||
<Tag>{info.getValue()}</Tag>
|
||||
<div className="flex flex-wrap gap-2 items-center px-2">
|
||||
<Tag>
|
||||
{info.getValue().length != 0
|
||||
? info.getValue()
|
||||
: "no role"}
|
||||
</Tag>
|
||||
</div>
|
||||
),
|
||||
}),
|
||||
|
@ -122,9 +126,13 @@ export default function UserTable({ data, setData }: UserTableProps) {
|
|||
),
|
||||
cell: (info) => (
|
||||
<div className="flex ml-2 flex-wrap gap-2 items-center">
|
||||
{info.getValue().map((tag: string, index: number) => {
|
||||
return <Tag key={index}>{tag}</Tag>;
|
||||
})}
|
||||
{info.getValue().length > 0 ? (
|
||||
info.getValue().map((tag: string, index: number) => {
|
||||
return <Tag key={index}>{tag}</Tag>;
|
||||
})
|
||||
) : (
|
||||
<Tag>no programs</Tag>
|
||||
)}
|
||||
</div>
|
||||
),
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue
Block a user