mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-15 01:14:27 -05:00
fix: error on admin share management page if a share was created by an anonymous user
This commit is contained in:
parent
908d6e298f
commit
c999df15e0
2 changed files with 9 additions and 2 deletions
|
@ -5,6 +5,7 @@ import {
|
|||
MediaQuery,
|
||||
Skeleton,
|
||||
Table,
|
||||
Text,
|
||||
} from "@mantine/core";
|
||||
import { useClipboard } from "@mantine/hooks";
|
||||
import { useModals } from "@mantine/modals";
|
||||
|
@ -65,7 +66,13 @@ const ManageShareTable = ({
|
|||
<tr key={share.id}>
|
||||
<td>{share.id}</td>
|
||||
<td>{share.name}</td>
|
||||
<td>{share.creator.username}</td>
|
||||
<td>
|
||||
{share.creator ? (
|
||||
share.creator.username
|
||||
) : (
|
||||
<Text color="dimmed">Anonymous</Text>
|
||||
)}
|
||||
</td>
|
||||
<td>{share.views}</td>
|
||||
<td>{byteToHumanSizeString(share.size)}</td>
|
||||
<td>
|
||||
|
|
|
@ -4,7 +4,7 @@ export type Share = {
|
|||
id: string;
|
||||
name?: string;
|
||||
files: any;
|
||||
creator: User;
|
||||
creator?: User;
|
||||
description?: string;
|
||||
expiration: Date;
|
||||
size: number;
|
||||
|
|
Loading…
Add table
Reference in a new issue