fix(dashboard-v2): get rid of downloads section

This commit is contained in:
Michał Leszczyk 2022-04-12 13:18:15 +02:00
parent d15d2146f5
commit 53b0687b21
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
4 changed files with 6 additions and 29 deletions

View File

@ -10,7 +10,7 @@ const parseFileName = (fileName) => {
const formatItem = ({ size, name: rawFileName, uploadedOn, downloadedOn, ...rest }) => {
const [name, type] = parseFileName(rawFileName);
const date = dayjs(uploadedOn || downloadedOn).format("MM/DD/YYYY; HH:MM");
const date = dayjs(uploadedOn || downloadedOn).format("MM/DD/YYYY HH:MM");
return {
...rest,

View File

@ -1,23 +1,13 @@
import * as React from "react";
import { Panel } from "../Panel";
import { Tab, TabPanel, Tabs } from "../Tabs";
import ActivityTable from "./ActivityTable";
export default function LatestActivity() {
return (
<Panel title="Latest activity">
<Tabs>
<Tab id="uploads" title="Uploads" />
<Tab id="downloads" title="Downloads" />
<TabPanel tabId="uploads" className="pt-4">
<ActivityTable type="uploads" />
</TabPanel>
<TabPanel tabId="downloads" className="pt-4">
<ActivityTable type="downloads" />
</TabPanel>
</Tabs>
<Panel title="Latest uploads">
<ActivityTable type="uploads" />
</Panel>
);
}

View File

@ -10,7 +10,7 @@ const parseFileName = (fileName) => {
const formatItem = ({ size, name: rawFileName, uploadedOn, downloadedOn, ...rest }) => {
const [name, type] = parseFileName(rawFileName);
const date = dayjs(uploadedOn || downloadedOn).format("MM/DD/YYYY; HH:MM");
const date = dayjs(uploadedOn || downloadedOn).format("MM/DD/YYYY HH:MM");
return {
...rest,

View File

@ -1,32 +1,19 @@
import * as React from "react";
import { useSearchParam } from "react-use";
import DashboardLayout from "../layouts/DashboardLayout";
import { Panel } from "../components/Panel";
import { Tab, TabPanel, Tabs } from "../components/Tabs";
import { Metadata } from "../components/Metadata";
import FileList from "../components/FileList/FileList";
const FilesPage = () => {
const defaultTab = useSearchParam("tab");
return (
<>
<Metadata>
<title>My Files</title>
<title>Files</title>
</Metadata>
<Panel title="Files">
<Tabs defaultTab={defaultTab || "uploads"}>
<Tab id="uploads" title="Uploads" />
<Tab id="downloads" title="Downloads" />
<TabPanel tabId="uploads" className="pt-4">
<FileList type="uploads" />
</TabPanel>
<TabPanel tabId="downloads" className="pt-4">
<FileList type="downloads" />
</TabPanel>
</Tabs>
<FileList type="uploads" />
</Panel>
</>
);