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 {
cloneDepth?: number
cloneAllBranches?: boolean
plugin: any
}
export const SelectAndCloneRepositories = (props: RepositoriesProps) => {
@ -45,7 +44,7 @@ export const SelectAndCloneRepositories = (props: RepositoriesProps) => {
return (
<>
<RepositorySelect select={selectRepo} />
<TokenWarning plugin={props.plugin} />
<TokenWarning />
{ repo && <BranchSelect select={selectRemoteBranch} /> }

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

@ -8,11 +8,7 @@ import { SelectAndCloneRepositories } from "../github/selectandclonerepositories
import { RemixUiCheckbox } from "@remix-ui/checkbox"
import GitUIButton from "../buttons/gituibutton"
export interface CloneProps {
plugin: any
}
export const Clone = ({ plugin }: CloneProps) => {
export const Clone = () => {
const context = React.useContext(gitPluginContext)
const actions = React.useContext(gitActionsContext)
const [cloneUrl, setCloneUrl] = useLocalStorage(
@ -68,7 +64,7 @@ export const Clone = ({ plugin }: CloneProps) => {
return (
<>
<div data-id="clone-panel-content">
<SelectAndCloneRepositories cloneAllBranches={cloneAllBranches} cloneDepth={cloneDepth} plugin={plugin} />
<SelectAndCloneRepositories cloneAllBranches={cloneAllBranches} cloneDepth={cloneDepth} />
<hr />
<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" />

Loading…
Cancel
Save