changing directoary after clock on it

This commit is contained in:
2024-09-01 09:39:52 +00:00
parent 931239b80c
commit 7fb0c73c6d

View File

@@ -164,7 +164,19 @@ const Index = () => {
<div className="w-10">
{file.attributes.is_file ? <DocumentIcon /> : <FolderIcon />}
</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">
{file.attributes.is_file ? `${file.attributes.size} bytes` : ""}
</div>