From 4cd44d20255941909d652e547c44f3c80c23cfbc Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 23 Aug 2020 16:03:54 -0700 Subject: [PATCH] Hide checkbox when editing/creating files --- .../components/server/files/FileManagerBreadcrumbs.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/scripts/components/server/files/FileManagerBreadcrumbs.tsx b/resources/scripts/components/server/files/FileManagerBreadcrumbs.tsx index 15a5f39c4..5ec1efa8a 100644 --- a/resources/scripts/components/server/files/FileManagerBreadcrumbs.tsx +++ b/resources/scripts/components/server/files/FileManagerBreadcrumbs.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react'; import { ServerContext } from '@/state/server'; -import { NavLink } from 'react-router-dom'; +import { NavLink, useRouteMatch } from 'react-router-dom'; import { cleanDirectoryPath } from '@/helpers'; import tw from 'twin.macro'; import { FileActionCheckbox } from '@/components/server/files/SelectFileCheckbox'; @@ -13,6 +13,7 @@ interface Props { export default ({ withinFileEditor, isNewFile }: Props) => { const [ file, setFile ] = useState(null); + const { params } = useRouteMatch>(); const id = ServerContext.useStoreState(state => state.server.data!.id); const directory = ServerContext.useStoreState(state => state.files.directory); @@ -44,7 +45,7 @@ export default ({ withinFileEditor, isNewFile }: Props) => { return (
- {!!(files && files.length) && + {(files && files.length && !params?.action) &&