chore: add statistics view

This commit is contained in:
Steven
2024-01-03 08:22:32 +08:00
parent 138b69e36e
commit 914c0620c4
10 changed files with 98 additions and 260 deletions

View File

@ -31,6 +31,7 @@ const MemoResourceListView = ({ resourceList = [] }: { resourceList: Resource[]
const MediaCard = ({ resource, thumbnail }: { resource: Resource; thumbnail?: boolean }) => {
const type = getResourceType(resource);
const url = getResourceUrl(resource);
if (type === "image/*") {
return (
<img
@ -40,9 +41,7 @@ const MemoResourceListView = ({ resourceList = [] }: { resourceList: Resource[]
decoding="async"
/>
);
}
if (type === "video/*") {
} else if (type === "video/*") {
return (
<video
className="cursor-pointer w-full h-full object-contain bg-zinc-100 dark:bg-zinc-800"
@ -52,9 +51,9 @@ const MemoResourceListView = ({ resourceList = [] }: { resourceList: Resource[]
controls
/>
);
} else {
return <></>;
}
return <></>;
};
const MediaList = ({ resources = [] }: { resources: Resource[] }) => {