feat(cluster-folder-view): add conditional navigation rendering
- Introduce `showNavigation` prop to control the visibility of the navigation header and breadcrumbs in the ClusterFolderView component. - Update ClusterPage to set `showNavigation` to false, disabling navigation for specific use cases.
This commit is contained in:
parent
4e3c4a1277
commit
ddf5f1e9b8
|
|
@ -401,6 +401,7 @@ export default function ClusterPage({ params }: ClusterPageProps) {
|
|||
onVideoClick={handleVideoClick}
|
||||
onPhotoClick={handlePhotoClick}
|
||||
onTextClick={handleTextClick}
|
||||
showNavigation={false}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ interface ClusterFolderViewProps {
|
|||
onVideoClick: (video: FileSystemItem) => void;
|
||||
onPhotoClick: (photo: FileSystemItem, index: number) => void;
|
||||
onTextClick: (text: FileSystemItem) => void;
|
||||
showNavigation?: boolean;
|
||||
}
|
||||
|
||||
export default function ClusterFolderView({
|
||||
|
|
@ -59,7 +60,8 @@ export default function ClusterFolderView({
|
|||
libraries: clusterLibraries,
|
||||
onVideoClick,
|
||||
onPhotoClick,
|
||||
onTextClick
|
||||
onTextClick,
|
||||
showNavigation = true
|
||||
}: ClusterFolderViewProps) {
|
||||
const router = useRouter();
|
||||
const [currentPath, setCurrentPath] = useState<string | null>(null); // null = virtual root
|
||||
|
|
@ -333,7 +335,8 @@ export default function ClusterFolderView({
|
|||
// Render Folder View (using VirtualizedFolderGrid)
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
{/* Custom Header with Breadcrumbs */}
|
||||
{/* Custom Header with Breadcrumbs - only show if showNavigation is true */}
|
||||
{showNavigation && (
|
||||
<div className="flex items-center gap-4">
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
|
@ -375,6 +378,7 @@ export default function ClusterFolderView({
|
|||
))}
|
||||
</nav>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Folder Grid */}
|
||||
<VirtualizedFolderGrid
|
||||
|
|
|
|||
Loading…
Reference in New Issue