김재형

Add file and folder icon

...@@ -2,14 +2,18 @@ import React, { Fragment } from "react"; ...@@ -2,14 +2,18 @@ import React, { Fragment } from "react";
2 import { FileItem } from "./useFileList"; 2 import { FileItem } from "./useFileList";
3 import { Link } from "react-router-dom"; 3 import { Link } from "react-router-dom";
4 4
5 +import { FolderFilled, FileFilled } from "@ant-design/icons";
6 +
5 export function FileListItem({ item }: { item: FileItem }) { 7 export function FileListItem({ item }: { item: FileItem }) {
6 - return ( 8 + return item.is_folder ? (
7 <Fragment> 9 <Fragment>
8 - {item.is_folder ? ( 10 + <Link to={`/folder/${item.id}`}>
9 - <Link to={`/folder/${item.id}`}>{item.name}</Link> 11 + <FolderFilled /> {item.name}
12 + </Link>
13 + </Fragment>
10 ) : ( 14 ) : (
11 - item.name 15 + <Fragment>
12 - )} 16 + <FileFilled /> {item.name}
13 </Fragment> 17 </Fragment>
14 ); 18 );
15 } 19 }
......