rm unused events

largegittest2
bunsenstraat 3 months ago
parent 4ba33316fd
commit c7a3063d1c
  1. 2
      libs/remix-ui/git/src/components/github/devicecode.tsx
  2. 6
      libs/remix-ui/git/src/components/gitui.tsx
  3. 2
      libs/remix-ui/git/src/components/panels/githubcredentials.tsx
  4. 8
      libs/remix-ui/git/src/lib/pluginActions.ts
  5. 2
      libs/remix-ui/git/src/state/context.tsx

@ -64,7 +64,6 @@ export const GetDeviceCode = () => {
await actions.loadGitHubUserFromToken()
} else {
await sendToMatomo(gitMatomoEventTypes.CONNECTTOGITHUBFAIL)
pluginActions.disconnectFromGithub()
}
}
@ -74,7 +73,6 @@ export const GetDeviceCode = () => {
setGitHubResponse(null)
await pluginActions.saveToken(null)
await actions.loadGitHubUserFromToken()
pluginActions.disconnectFromGithub()
}
return (

@ -1,7 +1,7 @@
import React, { useContext, useEffect, useReducer, useState } from 'react'
import { add, addall, checkout, checkoutfile, clone, commit, createBranch, remoteBranches, repositories, rm, getCommitChanges, diff, resolveRef, getBranchCommits, setUpstreamRemote, loadGitHubUserFromToken, getBranches, getRemotes, remoteCommits, saveGitHubCredentials, getGitHubCredentialsFromLocalStorage, fetch, pull, push, setDefaultRemote, addRemote, removeRemote, sendToGitLog, clearGitLog, getBranchDifferences, getFileStatusMatrix, init, showAlert, gitlog } from '../lib/gitactions'
import { loadFiles, setCallBacks } from '../lib/listeners'
import { openDiff, openFile, saveToken, sendToMatomo, setModifiedDecorator, setPlugin, setUntrackedDecorator, statusChanged, disconnectFromGithub, logInGitHub } from '../lib/pluginActions'
import { openDiff, openFile, saveToken, sendToMatomo, setModifiedDecorator, setPlugin, setUntrackedDecorator, statusChanged } from '../lib/pluginActions'
import { gitActionsContext, pluginActionsContext } from '../state/context'
import { gitReducer } from '../state/gitreducer'
import { defaultGitState, defaultLoaderState, gitMatomoEventTypes, gitState, gitUIPanels, loaderState } from '../types'
@ -162,9 +162,7 @@ export const GitUI = (props: IGitUi) => {
saveToken,
saveGitHubCredentials,
getGitHubCredentialsFromLocalStorage,
showAlert,
disconnectFromGithub,
logInGitHub
showAlert
}
return (

@ -55,7 +55,6 @@ export const GitHubCredentials = () => {
setGithubToken(credentials.token || '')
setGithubUsername(credentials.username || '')
setGithubEmail(credentials.email || '')
pluginactions.logInGitHub()
}
function removeToken(): void {
@ -67,7 +66,6 @@ export const GitHubCredentials = () => {
email: '',
token: ''
})
pluginactions.disconnectFromGithub()
}
return (

@ -14,14 +14,6 @@ export const setPlugin = (p: Plugin<any, CustomRemixApi>, gitDispatcher: React.D
loaderDispatch = loaderDispatcher
}
export const disconnectFromGithub = () => {
plugin.emit('disconnectFromGithub')
}
export const logInGitHub = () => {
plugin.emit('loggedInGithubChanged')
}
export const statusChanged = (badges: number) => {
if (!plugin) return
plugin.emit('statusChanged', {

@ -54,8 +54,6 @@ export interface pluginActions {
token: string
}>
showAlert({ title, message }:{title: string, message: string}): Promise<void>
logInGitHub(): void
disconnectFromGithub(): void
}
export const pluginActionsContext = React.createContext<pluginActions>(null)
Loading…
Cancel
Save