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