drop documents page (now it is a regular page)

This commit is contained in:
tmshv committed 2020-02-29 01:04:28 +03:00
1 parent 55f44fab8c
commit 263f18a1df
5 files changed
+1 -182

No files matched your search

-22
View File
@@ -1,22 +0,0 @@
import * as React from 'react'
import { IDocument } from '../../types'
import { DocumentListItem } from '../DocumentListItem'
export interface IDocumentListProps {
documents: IDocument[]
name: string
}
export const DocumentList: React.FC<IDocumentListProps> = props => (
<div className="documents-container">
<div className="documents-container__head">
<h2>{props.name}</h2>
</div>
<div className="documents-container__body">
{props.documents.map((d, i) => (
<DocumentListItem key={i} {...d} />
))}
</div>
</div>
)
+1 -1
View File
@@ -20,7 +20,7 @@ export interface IPage {
}
export interface IDocument {
category: string
// category: string
fileName: string
fileSize: number
fileUrl: string
-20
View File
@@ -36,26 +36,6 @@ export function choise(scope, selector) {
return scope.reduce(selector, null);
}
export function unique<T, U>(fn: (value: T) => U): (list: T[]) => U[] {
return list => Array.from(
new Set(list.map(fn))
)
}
export function branch(fn) {
let keys = unique(fn);
return list => keys(list)
.reduce((dict: any, key: any) => {
dict[key] = list.filter(
i => fn(i) === key
);
return dict;
}, {})
}
export function assign(dict, key, value) {
dict[key] = value;
return dict;