Selectively show the additional metadata if it isn't in the display string at all

This commit is contained in:
DaneEveritt 2022-06-12 15:30:49 -04:00
parent 88987fb6c7
commit 68a654f9e8
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 33 additions and 7 deletions

View file

@ -73,7 +73,7 @@ export default ({ activity, children }: Props) => {
</Tooltip>
</div>
</div>
<ActivityLogMetaButton meta={activity.properties}/>
{activity.hasAdditionalMetadata && <ActivityLogMetaButton meta={activity.properties}/>}
</div>
</div>
);

View file

@ -1,5 +1,4 @@
import React, { useState } from 'react';
import { isEmptyObject } from '@/helpers';
import { ClipboardListIcon } from '@heroicons/react/outline';
import { Dialog } from '@/components/elements/dialog';
import { Button } from '@/components/elements/button/index';
@ -7,10 +6,6 @@ import { Button } from '@/components/elements/button/index';
export default ({ meta }: { meta: Record<string, unknown> }) => {
const [ open, setOpen ] = useState(false);
if (isEmptyObject(meta)) {
return null;
}
return (
<div className={'self-center mx-4'}>
<Dialog