김재형

Add file and folder icon

......@@ -2,14 +2,18 @@ import React, { Fragment } from "react";
import { FileItem } from "./useFileList";
import { Link } from "react-router-dom";
import { FolderFilled, FileFilled } from "@ant-design/icons";
export function FileListItem({ item }: { item: FileItem }) {
return (
return item.is_folder ? (
<Fragment>
<Link to={`/folder/${item.id}`}>
<FolderFilled /> {item.name}
</Link>
</Fragment>
) : (
<Fragment>
{item.is_folder ? (
<Link to={`/folder/${item.id}`}>{item.name}</Link>
) : (
item.name
)}
<FileFilled /> {item.name}
</Fragment>
);
}
......