Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 9d45fc6

Browse files
authored
fix/dotcom: do not require Salesforce subscription ID (#64518)
See https://linear.app/sourcegraph/issue/CORE-256 and https://sourcegraph.slack.com/archives/C05GJPTSZCZ/p1723835604698979?thread_ts=1723834983.348549&cid=C05GJPTSZCZ There is no backend validation for this. ## Test plan n/a
1 parent 29d156b commit 9d45fc6

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminCreateProductSubscriptionPage.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useMemo, useState } from 'react'
1+
import React, { useEffect, useState } from 'react'
22

33
import { QueryClientProvider } from '@tanstack/react-query'
44
import { Navigate, useSearchParams } from 'react-router-dom'
@@ -15,7 +15,6 @@ import {
1515
getDefaultInputProps,
1616
useField,
1717
createRequiredValidator,
18-
composeValidators,
1918
Input,
2019
Text,
2120
Label,
@@ -162,19 +161,7 @@ const Page: React.FunctionComponent<React.PropsWithChildren<Props>> = props => {
162161
name: 'salesforceSubscriptionID',
163162
formApi: formAPI,
164163
validators: {
165-
sync: useMemo(
166-
() =>
167-
composeValidators<string, unknown>([
168-
value => {
169-
if (instanceType.input.value !== EnterpriseSubscriptionInstanceType.INTERNAL && !value) {
170-
return 'Salesforce subscription ID is required for non-internal instances.'
171-
}
172-
return
173-
},
174-
SALESFORCE_SUBSCRIPTION_ID_VALIDATOR,
175-
]),
176-
[instanceType.input.value]
177-
),
164+
sync: SALESFORCE_SUBSCRIPTION_ID_VALIDATOR,
178165
},
179166
})
180167

0 commit comments

Comments
 (0)