fix
This commit is contained in:
@@ -4,7 +4,9 @@ import React, { useCallback } from "react";
|
||||
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import TextEditor from "@/components/TextEditor";
|
||||
import BreadCrumbs from "@/components/FilesEditor/BreadCrumbs";
|
||||
import BreadCrumbs from "@/components/BreadCrumbs";
|
||||
import ServerIcon from "@/components/Icons/Server";
|
||||
import FolderIcon from "@/components/Icons/Folder";
|
||||
|
||||
function Page() {
|
||||
const searchParams = useSearchParams();
|
||||
@@ -17,11 +19,41 @@ function Page() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<BreadCrumbs
|
||||
changeDirectory={changeDirectory}
|
||||
serverId={serverId}
|
||||
path={path}
|
||||
/>
|
||||
<BreadCrumbs>
|
||||
<li>
|
||||
<div className="mr-2">
|
||||
<ServerIcon />
|
||||
</div>
|
||||
{serverId}
|
||||
</li>
|
||||
<li>
|
||||
<a href={`/files?serverid=${serverId}&path=/`}>
|
||||
<div className="mr-2">
|
||||
<FolderIcon />
|
||||
</div>
|
||||
<span>/</span>
|
||||
</a>
|
||||
</li>
|
||||
{path
|
||||
.split("/")
|
||||
.filter((p) => p !== "")
|
||||
.map((element, index) => {
|
||||
const tmp_path = path
|
||||
.split("/")
|
||||
.slice(0, index + 2)
|
||||
.join("/");
|
||||
return (
|
||||
<li key={index}>
|
||||
<a href={`/files?serverid=${serverId}&path=${tmp_path}`}>
|
||||
<div className="mr-2">
|
||||
<FolderIcon />
|
||||
</div>
|
||||
<span>{element}</span>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</BreadCrumbs>
|
||||
<TextEditor />;
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user