From 94737fdc09ca755c8af60bfcc391698397ec02c8 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Tue, 2 Jul 2024 08:24:38 +0200 Subject: [PATCH] resolve issues --- .../git/src/components/github/branchselect.tsx | 13 +++++++------ .../git/src/components/github/devicecode.tsx | 4 ---- .../src/components/navigation/branchedetails.tsx | 2 +- libs/remix-ui/git/src/components/panels/clone.tsx | 1 - 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/libs/remix-ui/git/src/components/github/branchselect.tsx b/libs/remix-ui/git/src/components/github/branchselect.tsx index a90d259369..e272f266f9 100644 --- a/libs/remix-ui/git/src/components/github/branchselect.tsx +++ b/libs/remix-ui/git/src/components/github/branchselect.tsx @@ -5,7 +5,7 @@ import { selectStyles, selectTheme } from '../../types/styles'; import { gitPluginContext } from '../gitui'; interface BranchySelectProps { - select: (branch:{ name: string }) => void; + select: (branch: { name: string }) => void; } export const BranchSelect = (props: BranchySelectProps) => { @@ -15,10 +15,11 @@ export const BranchSelect = (props: BranchySelectProps) => { useEffect(() => { if (context.remoteBranches && context.remoteBranches.length > 0) { - const options = context.remoteBranches && context.remoteBranches.length > 0 && context.remoteBranches.map(branch => { - return { value: branch.name, label: branch.name } - } - ) + const options = context.remoteBranches + && context.remoteBranches.length > 0 + && context.remoteBranches.map(branch => { + return { value: branch.name, label: branch.name } + }) setBranchOptions(options) } else { setBranchOptions(null) @@ -39,7 +40,7 @@ export const BranchSelect = (props: BranchySelectProps) => { options={branchOptions} className="mt-1" id="branch-select" - onChange={(e: any) =>selectRemoteBranch(e)} + onChange={(e: any) => selectRemoteBranch(e)} theme={selectTheme} styles={selectStyles} isClearable={true} diff --git a/libs/remix-ui/git/src/components/github/devicecode.tsx b/libs/remix-ui/git/src/components/github/devicecode.tsx index 65233b6bc4..cd611efe4d 100644 --- a/libs/remix-ui/git/src/components/github/devicecode.tsx +++ b/libs/remix-ui/git/src/components/github/devicecode.tsx @@ -54,10 +54,6 @@ export const GetDeviceCode = () => { // convert response to json const response = await accestokenresponse.data; - if (response.error) { - - } - if (response.access_token) { setAuthorized(true) await pluginActions.saveToken(response.access_token) diff --git a/libs/remix-ui/git/src/components/navigation/branchedetails.tsx b/libs/remix-ui/git/src/components/navigation/branchedetails.tsx index 2fe9218d7d..ee3ee88e24 100644 --- a/libs/remix-ui/git/src/components/navigation/branchedetails.tsx +++ b/libs/remix-ui/git/src/components/navigation/branchedetails.tsx @@ -52,7 +52,7 @@ export const BrancheDetailsNavigation = (props: BrancheDetailsNavigationProps) = singleBranch: true, relative: true }) - //actions.fetch(null, branch.name, null, null, false, true) + } return ( diff --git a/libs/remix-ui/git/src/components/panels/clone.tsx b/libs/remix-ui/git/src/components/panels/clone.tsx index fedd6dfa4a..e72cf984af 100644 --- a/libs/remix-ui/git/src/components/panels/clone.tsx +++ b/libs/remix-ui/git/src/components/panels/clone.tsx @@ -38,7 +38,6 @@ export const Clone = () => { depth: cloneDepth, singleBranch: !cloneAllBranches }) - //await actions.clone(cloneUrl, cloneBranch, cloneDepth, !cloneAllBranches) } const onCloneBranchChange = (value: string) => {