resolve issues

pull/4877/head
bunsenstraat 5 months ago
parent 1b75431f36
commit 94737fdc09
  1. 13
      libs/remix-ui/git/src/components/github/branchselect.tsx
  2. 4
      libs/remix-ui/git/src/components/github/devicecode.tsx
  3. 2
      libs/remix-ui/git/src/components/navigation/branchedetails.tsx
  4. 1
      libs/remix-ui/git/src/components/panels/clone.tsx

@ -5,7 +5,7 @@ import { selectStyles, selectTheme } from '../../types/styles';
import { gitPluginContext } from '../gitui'; import { gitPluginContext } from '../gitui';
interface BranchySelectProps { interface BranchySelectProps {
select: (branch:{ name: string }) => void; select: (branch: { name: string }) => void;
} }
export const BranchSelect = (props: BranchySelectProps) => { export const BranchSelect = (props: BranchySelectProps) => {
@ -15,10 +15,11 @@ export const BranchSelect = (props: BranchySelectProps) => {
useEffect(() => { useEffect(() => {
if (context.remoteBranches && context.remoteBranches.length > 0) { if (context.remoteBranches && context.remoteBranches.length > 0) {
const options = context.remoteBranches && context.remoteBranches.length > 0 && context.remoteBranches.map(branch => { const options = context.remoteBranches
return { value: branch.name, label: branch.name } && context.remoteBranches.length > 0
} && context.remoteBranches.map(branch => {
) return { value: branch.name, label: branch.name }
})
setBranchOptions(options) setBranchOptions(options)
} else { } else {
setBranchOptions(null) setBranchOptions(null)
@ -39,7 +40,7 @@ export const BranchSelect = (props: BranchySelectProps) => {
options={branchOptions} options={branchOptions}
className="mt-1" className="mt-1"
id="branch-select" id="branch-select"
onChange={(e: any) =>selectRemoteBranch(e)} onChange={(e: any) => selectRemoteBranch(e)}
theme={selectTheme} theme={selectTheme}
styles={selectStyles} styles={selectStyles}
isClearable={true} isClearable={true}

@ -54,10 +54,6 @@ export const GetDeviceCode = () => {
// convert response to json // convert response to json
const response = await accestokenresponse.data; const response = await accestokenresponse.data;
if (response.error) {
}
if (response.access_token) { if (response.access_token) {
setAuthorized(true) setAuthorized(true)
await pluginActions.saveToken(response.access_token) await pluginActions.saveToken(response.access_token)

@ -52,7 +52,7 @@ export const BrancheDetailsNavigation = (props: BrancheDetailsNavigationProps) =
singleBranch: true, singleBranch: true,
relative: true relative: true
}) })
//actions.fetch(null, branch.name, null, null, false, true)
} }
return ( return (

@ -38,7 +38,6 @@ export const Clone = () => {
depth: cloneDepth, depth: cloneDepth,
singleBranch: !cloneAllBranches singleBranch: !cloneAllBranches
}) })
//await actions.clone(cloneUrl, cloneBranch, cloneDepth, !cloneAllBranches)
} }
const onCloneBranchChange = (value: string) => { const onCloneBranchChange = (value: string) => {

Loading…
Cancel
Save