changing directoary after clock on it
This commit is contained in:
@@ -164,7 +164,19 @@ const Index = () => {
|
|||||||
<div className="w-10">
|
<div className="w-10">
|
||||||
{file.attributes.is_file ? <DocumentIcon /> : <FolderIcon />}
|
{file.attributes.is_file ? <DocumentIcon /> : <FolderIcon />}
|
||||||
</div>
|
</div>
|
||||||
<div className="w-64 text-left">{file.attributes.name}</div>
|
<div className="w-64 text-left">
|
||||||
|
{file.attributes.is_file ? (
|
||||||
|
<a href="#">{file.attributes.name}</a>
|
||||||
|
) : (
|
||||||
|
<a
|
||||||
|
onClick={() =>
|
||||||
|
changeDirectory(`${path}/${file.attributes.name}`)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{file.attributes.name}
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<div className="w-48 text-right">
|
<div className="w-48 text-right">
|
||||||
{file.attributes.is_file ? `${file.attributes.size} bytes` : ""}
|
{file.attributes.is_file ? `${file.attributes.size} bytes` : ""}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user