From 2699544f06aac92f33a103ca26703896e9c08e74 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 19 Feb 2024 18:55:20 +0100 Subject: [PATCH] remove uneeded param --- .../src/lib/components/file-explorer.tsx | 4 ++-- .../workspace/src/lib/remix-ui-workspace.tsx | 16 ++++++++-------- libs/remix-ui/workspace/src/lib/types/index.ts | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx index b323e2a750..c1ffe28bd5 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx @@ -143,12 +143,12 @@ export const FileExplorer = (props: FileExplorerProps) => { } } - const publishToGist = (path?: string, type?: string) => { + const publishToGist = (path?: string) => { props.modal( intl.formatMessage({ id: 'filePanel.createPublicGist' }), intl.formatMessage({ id: 'filePanel.createPublicGistMsg4' }, { name }), intl.formatMessage({ id: 'filePanel.ok' }), - () => toGist(path, type), + () => toGist(path), intl.formatMessage({ id: 'filePanel.cancel' }), () => { } ) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 0a054e4c73..25d48e3115 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -571,34 +571,34 @@ export function Workspace() { } } - const pushChangesToGist = (path?: string, type?: string) => { + const pushChangesToGist = (path?: string) => { global.modal( intl.formatMessage({id: 'filePanel.createPublicGist'}), intl.formatMessage({id: 'filePanel.createPublicGistMsg1'}), intl.formatMessage({id: 'filePanel.ok'}), - () => toGist(path, type), + () => toGist(path), intl.formatMessage({id: 'filePanel.cancel'}), () => {} ) } - const publishFolderToGist = (path?: string, type?: string) => { + const publishFolderToGist = (path?: string) => { global.modal( intl.formatMessage({id: 'filePanel.createPublicGist'}), intl.formatMessage({id: 'filePanel.createPublicGistMsg2'}, {path}), intl.formatMessage({id: 'filePanel.ok'}), - () => toGist(path, type), + () => toGist(path), intl.formatMessage({id: 'filePanel.cancel'}), () => {} ) } - const publishFileToGist = (path?: string, type?: string) => { + const publishFileToGist = (path?: string) => { global.modal( intl.formatMessage({id: 'filePanel.createPublicGist'}), intl.formatMessage({id: 'filePanel.createPublicGistMsg3'}, {path}), intl.formatMessage({id: 'filePanel.ok'}), - () => toGist(path, type), + () => toGist(path), intl.formatMessage({id: 'filePanel.cancel'}), () => {} ) @@ -633,8 +633,8 @@ export function Workspace() { ) } - const toGist = (path?: string, type?: string) => { - global.dispatchPublishToGist(path, type) + const toGist = (path?: string) => { + global.dispatchPublishToGist(path) } const editModeOn = (path: string, type: string, isNew = false) => { diff --git a/libs/remix-ui/workspace/src/lib/types/index.ts b/libs/remix-ui/workspace/src/lib/types/index.ts index 635c9925db..c9b7350eb1 100644 --- a/libs/remix-ui/workspace/src/lib/types/index.ts +++ b/libs/remix-ui/workspace/src/lib/types/index.ts @@ -155,10 +155,10 @@ export interface FileExplorerContextMenuProps { renamePath: (path: string, type: string) => void downloadPath: (path: string) => void hideContextMenu: () => void - publishToGist?: (path?: string, type?: string) => void - pushChangesToGist?: (path?: string, type?: string) => void - publishFolderToGist?: (path?: string, type?: string) => void - publishFileToGist?: (path?: string, type?: string) => void + publishToGist?: (path?: string) => void + pushChangesToGist?: (path?: string) => void + publishFolderToGist?: (path?: string) => void + publishFileToGist?: (path?: string) => void runScript?: (path: string) => void emit?: (cmd: customAction) => void pageX: number