remove uneeded param

pull/4550/head
yann300 9 months ago
parent d6aa344e68
commit 2699544f06
  1. 4
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
  2. 16
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
  3. 8
      libs/remix-ui/workspace/src/lib/types/index.ts

@ -143,12 +143,12 @@ export const FileExplorer = (props: FileExplorerProps) => {
} }
} }
const publishToGist = (path?: string, type?: string) => { const publishToGist = (path?: string) => {
props.modal( props.modal(
intl.formatMessage({ id: 'filePanel.createPublicGist' }), intl.formatMessage({ id: 'filePanel.createPublicGist' }),
intl.formatMessage({ id: 'filePanel.createPublicGistMsg4' }, { name }), intl.formatMessage({ id: 'filePanel.createPublicGistMsg4' }, { name }),
intl.formatMessage({ id: 'filePanel.ok' }), intl.formatMessage({ id: 'filePanel.ok' }),
() => toGist(path, type), () => toGist(path),
intl.formatMessage({ id: 'filePanel.cancel' }), intl.formatMessage({ id: 'filePanel.cancel' }),
() => { } () => { }
) )

@ -571,34 +571,34 @@ export function Workspace() {
} }
} }
const pushChangesToGist = (path?: string, type?: string) => { const pushChangesToGist = (path?: string) => {
global.modal( global.modal(
intl.formatMessage({id: 'filePanel.createPublicGist'}), intl.formatMessage({id: 'filePanel.createPublicGist'}),
intl.formatMessage({id: 'filePanel.createPublicGistMsg1'}), intl.formatMessage({id: 'filePanel.createPublicGistMsg1'}),
intl.formatMessage({id: 'filePanel.ok'}), intl.formatMessage({id: 'filePanel.ok'}),
() => toGist(path, type), () => toGist(path),
intl.formatMessage({id: 'filePanel.cancel'}), intl.formatMessage({id: 'filePanel.cancel'}),
() => {} () => {}
) )
} }
const publishFolderToGist = (path?: string, type?: string) => { const publishFolderToGist = (path?: string) => {
global.modal( global.modal(
intl.formatMessage({id: 'filePanel.createPublicGist'}), intl.formatMessage({id: 'filePanel.createPublicGist'}),
intl.formatMessage({id: 'filePanel.createPublicGistMsg2'}, {path}), intl.formatMessage({id: 'filePanel.createPublicGistMsg2'}, {path}),
intl.formatMessage({id: 'filePanel.ok'}), intl.formatMessage({id: 'filePanel.ok'}),
() => toGist(path, type), () => toGist(path),
intl.formatMessage({id: 'filePanel.cancel'}), intl.formatMessage({id: 'filePanel.cancel'}),
() => {} () => {}
) )
} }
const publishFileToGist = (path?: string, type?: string) => { const publishFileToGist = (path?: string) => {
global.modal( global.modal(
intl.formatMessage({id: 'filePanel.createPublicGist'}), intl.formatMessage({id: 'filePanel.createPublicGist'}),
intl.formatMessage({id: 'filePanel.createPublicGistMsg3'}, {path}), intl.formatMessage({id: 'filePanel.createPublicGistMsg3'}, {path}),
intl.formatMessage({id: 'filePanel.ok'}), intl.formatMessage({id: 'filePanel.ok'}),
() => toGist(path, type), () => toGist(path),
intl.formatMessage({id: 'filePanel.cancel'}), intl.formatMessage({id: 'filePanel.cancel'}),
() => {} () => {}
) )
@ -633,8 +633,8 @@ export function Workspace() {
) )
} }
const toGist = (path?: string, type?: string) => { const toGist = (path?: string) => {
global.dispatchPublishToGist(path, type) global.dispatchPublishToGist(path)
} }
const editModeOn = (path: string, type: string, isNew = false) => { const editModeOn = (path: string, type: string, isNew = false) => {

@ -155,10 +155,10 @@ export interface FileExplorerContextMenuProps {
renamePath: (path: string, type: string) => void renamePath: (path: string, type: string) => void
downloadPath: (path: string) => void downloadPath: (path: string) => void
hideContextMenu: () => void hideContextMenu: () => void
publishToGist?: (path?: string, type?: string) => void publishToGist?: (path?: string) => void
pushChangesToGist?: (path?: string, type?: string) => void pushChangesToGist?: (path?: string) => void
publishFolderToGist?: (path?: string, type?: string) => void publishFolderToGist?: (path?: string) => void
publishFileToGist?: (path?: string, type?: string) => void publishFileToGist?: (path?: string) => void
runScript?: (path: string) => void runScript?: (path: string) => void
emit?: (cmd: customAction) => void emit?: (cmd: customAction) => void
pageX: number pageX: number

Loading…
Cancel
Save