apps/web: support visible parameter

This commit is contained in:
vchikalkin 2023-11-09 18:50:39 +03:00
parent 8c7f7d8bd3
commit 2b0989e706

View File

@ -19,7 +19,10 @@ export default async function Page(props: Props) {
<Background>
<div className="grid auto-rows-auto grid-cols-2 gap-2 ">
{Object.keys(metaData).map((name) => {
const { fieldType } = metaData[name];
const { fieldType, visible } = metaData[name];
if (!visible) return false;
const Element = mapFieldTypeElement[fieldType];
return (