Support hiding activity from admin accounts not associated with the server

This commit is contained in:
DaneEveritt 2022-06-18 15:48:22 -04:00
parent 95de4c30fc
commit cf01490883
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 40 additions and 11 deletions

View file

@ -26,6 +26,10 @@ const PaginationFooter = ({ pagination, className, onPageSelect }: Props) => {
}
}
if (pagination.total === 0) {
return null;
}
return (
<div className={classNames('flex items-center justify-between my-2', className)}>
<p className={'text-sm text-neutral-500'}>

View file

@ -48,13 +48,16 @@ export default () => {
{!data && isValidating ?
<Spinner centered/>
:
<div className={'bg-gray-700'}>
{data?.items.map((activity) => (
<ActivityLogEntry key={activity.timestamp.toString() + activity.event} activity={activity}>
<span/>
</ActivityLogEntry>
))}
</div>
!data?.items.length ?
<p className={'text-sm text-center text-gray-400'}>No activity logs available for this server.</p>
:
<div className={'bg-gray-700'}>
{data?.items.map((activity) => (
<ActivityLogEntry key={activity.timestamp.toString() + activity.event} activity={activity}>
<span/>
</ActivityLogEntry>
))}
</div>
}
{data && <PaginationFooter
pagination={data.pagination}