mirror of
https://github.com/harness/drone.git
synced 2025-05-05 15:32:56 +00:00
fix: [CODE-2581] add SSH behind - CODE_SSH_ENABLED (#3756)
* fix: [CODE-2581] prettier * Apply suggestion from code review * fix: [CODE-2581] add SSH behind - CODE_SSH_ENABLED
This commit is contained in:
parent
2ec6fb8a58
commit
0658c11bc7
@ -40,8 +40,10 @@ enum CloneType {
|
||||
export function CloneButtonTooltip({ httpsURL, sshURL }: CloneButtonTooltipProps) {
|
||||
const { getString } = useStrings()
|
||||
const [flag, setFlag] = useState(false)
|
||||
const { isCurrentSessionPublic } = useAppContext()
|
||||
const { isCurrentSessionPublic, hooks, standalone } = useAppContext()
|
||||
const [type, setType] = useState(CloneType.HTTPS)
|
||||
const { CODE_SSH_ENABLED } = hooks?.useFeatureFlags()
|
||||
const isSSHEnabled = CODE_SSH_ENABLED || standalone
|
||||
return (
|
||||
<Container className={css.container} padding="xlarge">
|
||||
<Layout.Vertical spacing="small">
|
||||
@ -58,7 +60,7 @@ export function CloneButtonTooltip({ httpsURL, sshURL }: CloneButtonTooltipProps
|
||||
/>
|
||||
</Container>
|
||||
<Text font={{ variation: FontVariation.H4 }}>{getString('cloneHTTPS')}</Text>
|
||||
{sshURL ? (
|
||||
{isSSHEnabled && sshURL ? (
|
||||
<Container padding={{ top: 'small' }}>
|
||||
<Layout.Vertical>
|
||||
<Container padding={{ bottom: 'medium' }}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user