import React, { useState } from 'react'; import { Button, Input, Switch, Typography } from '@material-tailwind/react'; import RepositoryList from '../../create/RepositoryList'; import RepoConnectedSection from './RepoConnectedSection'; import GitSelectionSection from './GitSelectionSection'; import { GitSelect, RepositoryDetails } from '../../../../types/project'; const GitTabPanel = () => { const [gitSelect, setGitSelect] = useState('none'); const [linkedRepo, setLinkedRepo] = useState(); const gitSelectionHandler = (git: GitSelect) => { setGitSelect(git); }; const repoSelectionHandler = (repoDetails: RepositoryDetails) => { setLinkedRepo(repoDetails); }; return ( <>
Connect Git repository Create deployments for any commits pushed to your Git repository. {linkedRepo && } {!linkedRepo && (GitSelect.NONE === gitSelect ? ( ) : ( ))}
Pull request comments
Commit comments
Production branch By default, each commit pushed to the{' '} main branch initiates a production deployment. You can opt for a different branch for deployment in the settings. {!linkedRepo && (
^
This project isn't currently linked to a Git repository. To establish a production branch, please linked to an existing Git repository in the 'Connected Git Repository' section above.
)} Branch name
Deploy webhooks Webhooks configured to trigger when there is a change in a project's build or deployment status.
Webhook URL
); }; export default GitTabPanel;