Replace webpack with only esbuild

reduce node_modules size to only 18M
This commit is contained in:
2022-12-04 17:08:06 +08:00
parent b808d4be99
commit c09e230972
34 changed files with 602 additions and 37643 deletions

View File

@@ -0,0 +1,37 @@
import * as React from 'react';
import { useNavigate } from "react-router";
import { Tr } from "../translate";
function FoldersTable(props) {
let navigate = useNavigate();
if (props.folders.length === 0) {
return null;
}
return (
<table>
<thead>
<tr>
<th>{Tr("Folder name")}</th>
<th>{Tr("Action")}</th>
</tr>
</thead>
<tbody>
{props.folders.map((folder) => (
<tr key={folder.id}>
<td
onClick={() => navigate(`/folders/${folder.id}`)}
className="clickable"
>
{folder.foldername}
</td>
<td onClick={() => navigate(`/folders/${folder.id}`)}>
<button>{Tr("View")}</button>
</td>
</tr>
))}
</tbody>
</table>
);
}
export default FoldersTable;