1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-10-02 09:30:10 +02:00

fix: error on admin share management page if a share was created by an anonymous user

This commit is contained in:
Elias Schneider 2024-05-04 14:45:08 +03:00
parent 908d6e298f
commit c999df15e0
No known key found for this signature in database
GPG Key ID: 07E623B294202B6C
2 changed files with 9 additions and 2 deletions

View File

@ -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>

View File

@ -4,7 +4,7 @@ export type Share = {
id: string;
name?: string;
files: any;
creator: User;
creator?: User;
description?: string;
expiration: Date;
size: number;