fix(dashboard-v2): get rid of downloads section
This commit is contained in:
parent
d15d2146f5
commit
53b0687b21
|
@ -10,7 +10,7 @@ const parseFileName = (fileName) => {
|
||||||
|
|
||||||
const formatItem = ({ size, name: rawFileName, uploadedOn, downloadedOn, ...rest }) => {
|
const formatItem = ({ size, name: rawFileName, uploadedOn, downloadedOn, ...rest }) => {
|
||||||
const [name, type] = parseFileName(rawFileName);
|
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 {
|
return {
|
||||||
...rest,
|
...rest,
|
||||||
|
|
|
@ -1,23 +1,13 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
|
||||||
import { Panel } from "../Panel";
|
import { Panel } from "../Panel";
|
||||||
import { Tab, TabPanel, Tabs } from "../Tabs";
|
|
||||||
|
|
||||||
import ActivityTable from "./ActivityTable";
|
import ActivityTable from "./ActivityTable";
|
||||||
|
|
||||||
export default function LatestActivity() {
|
export default function LatestActivity() {
|
||||||
return (
|
return (
|
||||||
<Panel title="Latest activity">
|
<Panel title="Latest uploads">
|
||||||
<Tabs>
|
|
||||||
<Tab id="uploads" title="Uploads" />
|
|
||||||
<Tab id="downloads" title="Downloads" />
|
|
||||||
<TabPanel tabId="uploads" className="pt-4">
|
|
||||||
<ActivityTable type="uploads" />
|
<ActivityTable type="uploads" />
|
||||||
</TabPanel>
|
|
||||||
<TabPanel tabId="downloads" className="pt-4">
|
|
||||||
<ActivityTable type="downloads" />
|
|
||||||
</TabPanel>
|
|
||||||
</Tabs>
|
|
||||||
</Panel>
|
</Panel>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ const parseFileName = (fileName) => {
|
||||||
|
|
||||||
const formatItem = ({ size, name: rawFileName, uploadedOn, downloadedOn, ...rest }) => {
|
const formatItem = ({ size, name: rawFileName, uploadedOn, downloadedOn, ...rest }) => {
|
||||||
const [name, type] = parseFileName(rawFileName);
|
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 {
|
return {
|
||||||
...rest,
|
...rest,
|
||||||
|
|
|
@ -1,32 +1,19 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { useSearchParam } from "react-use";
|
|
||||||
|
|
||||||
import DashboardLayout from "../layouts/DashboardLayout";
|
import DashboardLayout from "../layouts/DashboardLayout";
|
||||||
|
|
||||||
import { Panel } from "../components/Panel";
|
import { Panel } from "../components/Panel";
|
||||||
import { Tab, TabPanel, Tabs } from "../components/Tabs";
|
|
||||||
import { Metadata } from "../components/Metadata";
|
import { Metadata } from "../components/Metadata";
|
||||||
import FileList from "../components/FileList/FileList";
|
import FileList from "../components/FileList/FileList";
|
||||||
|
|
||||||
const FilesPage = () => {
|
const FilesPage = () => {
|
||||||
const defaultTab = useSearchParam("tab");
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Metadata>
|
<Metadata>
|
||||||
<title>My Files</title>
|
<title>Files</title>
|
||||||
</Metadata>
|
</Metadata>
|
||||||
<Panel title="Files">
|
<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" />
|
<FileList type="uploads" />
|
||||||
</TabPanel>
|
|
||||||
<TabPanel tabId="downloads" className="pt-4">
|
|
||||||
<FileList type="downloads" />
|
|
||||||
</TabPanel>
|
|
||||||
</Tabs>
|
|
||||||
</Panel>
|
</Panel>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
Reference in New Issue