Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
C_Team_KhuDrive
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
김재형
2020-06-17 15:26:51 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e89d3c37498034eaf525841c8ecdce8db8d1d5a3
e89d3c37
1 parent
d1575cc4
Add file and folder icon
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
frontend/src/file/FileListItem.tsx
frontend/src/file/FileListItem.tsx
View file @
e89d3c3
...
...
@@ -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>
);
}
...
...
Please
register
or
login
to post a comment