mirror of
https://github.com/get-drexa/drive.git
synced 2025-12-01 05:51:39 +00:00
@@ -6,6 +6,7 @@ import type {
|
|||||||
import type { DirectoryInfo } from "@fileone/convex/types"
|
import type { DirectoryInfo } from "@fileone/convex/types"
|
||||||
import { Link } from "@tanstack/react-router"
|
import { Link } from "@tanstack/react-router"
|
||||||
import type { PrimitiveAtom } from "jotai"
|
import type { PrimitiveAtom } from "jotai"
|
||||||
|
import { atom } from "jotai"
|
||||||
import { Fragment } from "react"
|
import { Fragment } from "react"
|
||||||
import {
|
import {
|
||||||
Breadcrumb,
|
Breadcrumb,
|
||||||
@@ -24,11 +25,16 @@ import type { FileDragInfo } from "@/files/use-file-drop"
|
|||||||
import { useFileDrop } from "@/files/use-file-drop"
|
import { useFileDrop } from "@/files/use-file-drop"
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a placeholder file drag info atom that always stores null and is never mutated.
|
||||||
|
*/
|
||||||
|
const nullFileDragInfoAtom = atom<FileDragInfo | null>(null)
|
||||||
|
|
||||||
export function DirectoryPathBreadcrumb({
|
export function DirectoryPathBreadcrumb({
|
||||||
directory,
|
directory,
|
||||||
rootLabel,
|
rootLabel,
|
||||||
directoryUrlFn,
|
directoryUrlFn,
|
||||||
fileDragInfoAtom,
|
fileDragInfoAtom = nullFileDragInfoAtom,
|
||||||
}: {
|
}: {
|
||||||
directory: DirectoryInfo
|
directory: DirectoryInfo
|
||||||
rootLabel: string
|
rootLabel: string
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { api } from "@fileone/convex/api"
|
|||||||
import type { Doc, Id } from "@fileone/convex/dataModel"
|
import type { Doc, Id } from "@fileone/convex/dataModel"
|
||||||
import {
|
import {
|
||||||
type FileSystemItem,
|
type FileSystemItem,
|
||||||
FileType,
|
|
||||||
newFileSystemHandle,
|
newFileSystemHandle,
|
||||||
} from "@fileone/convex/filesystem"
|
} from "@fileone/convex/filesystem"
|
||||||
import { useMutation } from "@tanstack/react-query"
|
import { useMutation } from "@tanstack/react-query"
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ function RouteComponent() {
|
|||||||
>
|
>
|
||||||
<header className="flex py-2 shrink-0 items-center gap-2 border-b px-4 w-full">
|
<header className="flex py-2 shrink-0 items-center gap-2 border-b px-4 w-full">
|
||||||
<DirectoryPathBreadcrumb
|
<DirectoryPathBreadcrumb
|
||||||
|
directory={directory}
|
||||||
rootLabel="Trash"
|
rootLabel="Trash"
|
||||||
directoryUrlFn={directoryUrlById}
|
directoryUrlFn={directoryUrlById}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user