Update modal parameters

pull/1194/head
ioedeveloper 4 years ago
parent 6a8442f568
commit d6a3e6c728
  1. 10
      libs/remix-ui/file-explorer/src/lib/file-explorer.tsx

@ -592,10 +592,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
if (state.focusEdit.isNew) {
if (hasReservedKeyword(content)) {
removeInputField(parentFolder)(dispatch)
modal('Reserved Keyword', `File name contains remix reserved keywords. '${content}'`, {
label: 'Close',
fn: () => {}
}, null)
modal('Reserved Keyword', `File name contains remix reserved keywords. '${content}'`, 'Close', () => {})
} else {
state.focusEdit.type === 'file' ? createNewFile(joinPath(parentFolder, content)) : createNewFolder(joinPath(parentFolder, content))
removeInputField(parentFolder)(dispatch)
@ -603,10 +600,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
} else {
if (hasReservedKeyword(content)) {
editRef.current.textContent = state.focusEdit.lastEdit
modal('Reserved Keyword', `File name contains remix reserved keywords. '${content}'`, {
label: 'Close',
fn: () => {}
}, null)
modal('Reserved Keyword', `File name contains remix reserved keywords. '${content}'`, 'Close', () => {})
} else {
const oldPath: string = state.focusEdit.element
const oldName = extractNameFromKey(oldPath)

Loading…
Cancel
Save