Skip to content

Commit 4cd44d2

Browse files
committed
Hide checkbox when editing/creating files
1 parent 55cd7d4 commit 4cd44d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

resources/scripts/components/server/files/FileManagerBreadcrumbs.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useState } from 'react';
22
import { ServerContext } from '@/state/server';
3-
import { NavLink } from 'react-router-dom';
3+
import { NavLink, useRouteMatch } from 'react-router-dom';
44
import { cleanDirectoryPath } from '@/helpers';
55
import tw from 'twin.macro';
66
import { FileActionCheckbox } from '@/components/server/files/SelectFileCheckbox';
@@ -13,6 +13,7 @@ interface Props {
1313

1414
export default ({ withinFileEditor, isNewFile }: Props) => {
1515
const [ file, setFile ] = useState<string | null>(null);
16+
const { params } = useRouteMatch<Record<string, string>>();
1617
const id = ServerContext.useStoreState(state => state.server.data!.id);
1718
const directory = ServerContext.useStoreState(state => state.files.directory);
1819

@@ -44,7 +45,7 @@ export default ({ withinFileEditor, isNewFile }: Props) => {
4445

4546
return (
4647
<div css={tw`flex items-center text-sm mb-4 text-neutral-500`}>
47-
{!!(files && files.length) &&
48+
{(files && files.length && !params?.action) &&
4849
<FileActionCheckbox
4950
type={'checkbox'}
5051
css={tw`mx-4`}

0 commit comments

Comments
 (0)