remove unnecessary plugin props

pull/5000/head
Joseph Izang 7 months ago committed by Aniket
parent e59b7a8b3d
commit 477a24e8be
  1. 3
      libs/remix-ui/git/src/components/github/selectandclonerepositories.tsx
  2. 2
      libs/remix-ui/git/src/components/gitui.tsx
  3. 8
      libs/remix-ui/git/src/components/panels/clone.tsx

@ -9,7 +9,6 @@ import { TokenWarning } from "../panels/tokenWarning";
interface RepositoriesProps { interface RepositoriesProps {
cloneDepth?: number cloneDepth?: number
cloneAllBranches?: boolean cloneAllBranches?: boolean
plugin: any
} }
export const SelectAndCloneRepositories = (props: RepositoriesProps) => { export const SelectAndCloneRepositories = (props: RepositoriesProps) => {
@ -45,7 +44,7 @@ export const SelectAndCloneRepositories = (props: RepositoriesProps) => {
return ( return (
<> <>
<RepositorySelect select={selectRepo} /> <RepositorySelect select={selectRepo} />
<TokenWarning plugin={props.plugin} /> <TokenWarning />
{ repo && <BranchSelect select={selectRemoteBranch} /> } { repo && <BranchSelect select={selectRemoteBranch} /> }

@ -215,7 +215,7 @@ export const GitUI = (props: IGitUi) => {
<CloneNavigation eventKey="4" activePanel={activePanel} callback={setActivePanel} /> <CloneNavigation eventKey="4" activePanel={activePanel} callback={setActivePanel} />
<Accordion.Collapse className='bg-light' eventKey="4"> <Accordion.Collapse className='bg-light' eventKey="4">
<div className="px-2 py-2"> <div className="px-2 py-2">
<Clone plugin={plugin} /></div> <Clone /></div>
</Accordion.Collapse> </Accordion.Collapse>
<hr></hr> <hr></hr>
<GitHubNavigation eventKey="7" activePanel={activePanel} callback={setActivePanel} /> <GitHubNavigation eventKey="7" activePanel={activePanel} callback={setActivePanel} />

@ -8,11 +8,7 @@ import { SelectAndCloneRepositories } from "../github/selectandclonerepositories
import { RemixUiCheckbox } from "@remix-ui/checkbox" import { RemixUiCheckbox } from "@remix-ui/checkbox"
import GitUIButton from "../buttons/gituibutton" import GitUIButton from "../buttons/gituibutton"
export interface CloneProps { export const Clone = () => {
plugin: any
}
export const Clone = ({ plugin }: CloneProps) => {
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)
const actions = React.useContext(gitActionsContext) const actions = React.useContext(gitActionsContext)
const [cloneUrl, setCloneUrl] = useLocalStorage( const [cloneUrl, setCloneUrl] = useLocalStorage(
@ -68,7 +64,7 @@ export const Clone = ({ plugin }: CloneProps) => {
return ( return (
<> <>
<div data-id="clone-panel-content"> <div data-id="clone-panel-content">
<SelectAndCloneRepositories cloneAllBranches={cloneAllBranches} cloneDepth={cloneDepth} plugin={plugin} /> <SelectAndCloneRepositories cloneAllBranches={cloneAllBranches} cloneDepth={cloneDepth} />
<hr /> <hr />
<InputGroup className="mb-2 pb-1"> <InputGroup className="mb-2 pb-1">
<FormControl data-id="clone-url" id="cloneulr" placeholder="url" name='cloneurl' value={cloneUrl} onChange={e => onGitHubCloneUrlChange(e.target.value)} aria-describedby="urlprepend" /> <FormControl data-id="clone-url" id="cloneulr" placeholder="url" name='cloneurl' value={cloneUrl} onChange={e => onGitHubCloneUrlChange(e.target.value)} aria-describedby="urlprepend" />

Loading…
Cancel
Save