change(ui): hide vitals when there is none added
This commit is contained in:
parent
0e89885e5e
commit
42fec5c19f
1 changed files with 23 additions and 24 deletions
|
|
@ -32,11 +32,6 @@ function DashboardWidgetGrid(props: Props) {
|
||||||
|
|
||||||
const smallWidgetsLen = smallWidgets.length
|
const smallWidgetsLen = smallWidgets.length
|
||||||
|
|
||||||
// legacy
|
|
||||||
// smallWidgets.forEach((i, index) => {
|
|
||||||
|
|
||||||
// })
|
|
||||||
|
|
||||||
return useObserver(() => (
|
return useObserver(() => (
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
<Loader loading={loading}>
|
<Loader loading={loading}>
|
||||||
|
|
@ -48,6 +43,8 @@ function DashboardWidgetGrid(props: Props) {
|
||||||
<div className="w-4/5 m-auto mt-4"><AddMetricContainer siteId={siteId} /></div>
|
<div className="w-4/5 m-auto mt-4"><AddMetricContainer siteId={siteId} /></div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
{smallWidgets.length && (
|
||||||
|
<>
|
||||||
<div className="font-semibold text-xl py-4 flex items-center gap-2">
|
<div className="font-semibold text-xl py-4 flex items-center gap-2">
|
||||||
<Icon name="grid-horizontal" size={26} />
|
<Icon name="grid-horizontal" size={26} />
|
||||||
Web Vitals
|
Web Vitals
|
||||||
|
|
@ -67,6 +64,8 @@ function DashboardWidgetGrid(props: Props) {
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="font-semibold text-xl py-4 flex items-center gap-2">
|
<div className="font-semibold text-xl py-4 flex items-center gap-2">
|
||||||
<Icon name="grid-horizontal" size={26} />
|
<Icon name="grid-horizontal" size={26} />
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue