mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 23:19:09 +00:00
refactor: check for no custom project fields
This commit is contained in:
committed by
Carlos Valente
parent
36062458fe
commit
c72fff6bb6
@@ -37,7 +37,13 @@ export default function ProjectInfo(props: ProjectInfoProps) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const isEmpty = Object.values(general).every((value) => !value);
|
/**
|
||||||
|
* Check if there is data to show at all
|
||||||
|
* We need a special check for the project fields which can be an empty array
|
||||||
|
*/
|
||||||
|
const isEmpty = Object.values(general).every(
|
||||||
|
(value) => !value || (value && Array.isArray(value) && value.length === 0),
|
||||||
|
);
|
||||||
if (isEmpty) {
|
if (isEmpty) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user