diff options
Diffstat (limited to 'frontend/components/drive/DriveDirectoryView.tsx')
| -rw-r--r-- | frontend/components/drive/DriveDirectoryView.tsx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/frontend/components/drive/DriveDirectoryView.tsx b/frontend/components/drive/DriveDirectoryView.tsx index d2f30ee..de9d70a 100644 --- a/frontend/components/drive/DriveDirectoryView.tsx +++ b/frontend/components/drive/DriveDirectoryView.tsx | |||
| @@ -2,7 +2,6 @@ import { DriveLsEntry } from "@/lib/drive_types" | |||
| 2 | import { DriveDirectoryClient } from "./DriveDirectoryClient" | 2 | import { DriveDirectoryClient } from "./DriveDirectoryClient" |
| 3 | import { DriveHeader } from "./DriveHeader" | 3 | import { DriveHeader } from "./DriveHeader" |
| 4 | import type { StorageData } from "@/lib/storage" | 4 | import type { StorageData } from "@/lib/storage" |
| 5 | import { Auth_get_user } from "@/lib/auth" | ||
| 6 | 5 | ||
| 7 | interface DriveDirectoryViewProps { | 6 | interface DriveDirectoryViewProps { |
| 8 | path: string | 7 | path: string |
| @@ -20,7 +19,7 @@ function generateBreadcrumbs(currentPath: string) { | |||
| 20 | const breadcrumbs = [{ name: 'Root', path: '/drive' }] | 19 | const breadcrumbs = [{ name: 'Root', path: '/drive' }] |
| 21 | 20 | ||
| 22 | let accumulatedPath = '' | 21 | let accumulatedPath = '' |
| 23 | parts.forEach((part, index) => { | 22 | parts.forEach((part, _index) => { |
| 24 | accumulatedPath += '/' + part | 23 | accumulatedPath += '/' + part |
| 25 | breadcrumbs.push({ | 24 | breadcrumbs.push({ |
| 26 | name: decodeURIComponent(part), // Decode URL encoded characters | 25 | name: decodeURIComponent(part), // Decode URL encoded characters |
| @@ -48,7 +47,6 @@ function sortFiles(files: DriveLsEntry[]): DriveLsEntry[] { | |||
| 48 | export async function DriveDirectoryView({ path, files, storageData }: DriveDirectoryViewProps) { | 47 | export async function DriveDirectoryView({ path, files, storageData }: DriveDirectoryViewProps) { |
| 49 | const sortedFiles = sortFiles(files) | 48 | const sortedFiles = sortFiles(files) |
| 50 | const breadcrumbs = generateBreadcrumbs(path) | 49 | const breadcrumbs = generateBreadcrumbs(path) |
| 51 | const user = await Auth_get_user() | ||
| 52 | 50 | ||
| 53 | return ( | 51 | return ( |
| 54 | <div className="container mx-auto p-6 space-y-6"> | 52 | <div className="container mx-auto p-6 space-y-6"> |
| @@ -58,8 +56,7 @@ export async function DriveDirectoryView({ path, files, storageData }: DriveDire | |||
| 58 | files={sortedFiles} | 56 | files={sortedFiles} |
| 59 | breadcrumbs={breadcrumbs} | 57 | breadcrumbs={breadcrumbs} |
| 60 | storageData={storageData} | 58 | storageData={storageData} |
| 61 | user={user} | ||
| 62 | /> | 59 | /> |
| 63 | </div> | 60 | </div> |
| 64 | ) | 61 | ) |
| 65 | } \ No newline at end of file | 62 | } |
